Part of this is due to the immune response to such an injury, which causes some amount of inflammation leading to histamine release - the introduction of this paper has a nice overview. In addition, mechanical stress on nearby nerves due to collagen fibers being reformed may increase the feeling of itch. The sensations of pain and itch are at least _partially_ connected - there are pathways that are specific for each but also some that are shared. This is why pain can **actually inhibit itch** in some cases - like when you have a mosquito bite and slap it or apply a very hot wetted cloth to it.
This article gives a decent layman's overview of the connection between the two sensations. The sensation of itch still isn't fully understood, and there remains controversy as to how deeply it's actually tied to pain.