The 5 run penalty was first introduced in 1798: Penalty of 5 runs if a fielder stopped the ball with his hat. Why 5 and not some other number? We can only assume the law makers felt that 6 was too harsh and 4 too lenient.
I rekon its because A 6 has to be over the rope on the full without touching the field. So if the ball hits the helmet on the ground it was never gunna make the rope without touching. So 5 is the highest it can be, 4 for a boundry u could of scored plus an extra 1 for the obstruction.