Scratching an itch can feel really satisfying. The act of scratching actually triggers slight pain in your skin. This pain will distract your brain from the itch.
The reason scratching an itch causes it to itch more is because the pain from scratching releases the pain-fighting chemical serotonin which just happens to cause itching. This is also the reason why a healing wound might itch really bad.
To avoid worsening an itch, try to rub the area or taking a cold shower instead of scratching it. If you truly want to commit to scratching to stop an itch, sometimes a very hard scratch can cause enough pain to completely stop the itch.