The hatch had an explosive charge to open it. From This New Ocean, an outline of how it worked:
Among other innovations in No. 11 for MR-4 was an explosive side hatch, whose evolution, encouraged by the astronaut corps, had begun early in the Mercury program. The original egress procedure had been to climb out through the antenna compartment,a difficult maneuver that required the removal of a small pressure bulkhead. Since all the astronauts had found it hard to snake out the top of the frustum and cylinder, the STG and McDonnell designers had concluded that removal of an injured astronaut would be even more precarious. [...]
The explosive hatch, on the other hand, utilized the 70 bolts of the original design; a .06-inch hole was bored into each of the quarter-inch titanium bolts to provide a weak point. When a mild detonating fuse, placed in a groove around each bolt, was energized, the bolts were sheared simultaneously and the hatch sprang open.
There were two ways to activate the explosive egress hatch during recovery. About six to eight inches from the astronaut's right arm, as he lay in his couch, was a knobbed plunger. The pilot would remove a pin and press the plunger with a fist-force of five or six pounds, detonating the small explosive charge and blasting the hatch 25 feet away in a second. If the pin was in place, a fist-force of 40 pounds was required.
The same source describes Glenn's experience on MA-6:
Once Friendship 7 was lowered to the mattress pallet, Glenn began removing paneling, intending to leave the capsule through the upper hatch. But it was too hot, and the operation was too slow for the already long day. So he told the ship's crew to stand clear, carefully removed the hatch detonator, and hit the plunger with the back of his hand. The plunger recoiled, cutting Glenn's knuckles slightly through his glove and giving him the only injury he received during the whole mission.
It seems that it wasn't that you needed to hit it very hard (and so cause a bruise), it's that the handle was built in such a way it would be forced backwards into the hand of whoever had just set it off. I've definitely known spring-loaded latches on much more mundane things that seemed to work that way...
(Note that Glenn seems to have been fully aware of the fact it would hit him, was careful about it, and still got his knuckles scraped.)
They probably could have designed a better mechanism, but this was meant as a backup option - it was primarily developed as an additional way to get out quickly and easily in a hurry. If you're having to leave your spacecraft in an emergency, a bruised hand and skinned knuckles are the least of your worries, so there probably wasn't seen to be much urgency to make a more elegant solution.