Pretty much any modern car (1990s to present) will disable the fuel pump and ignition system within a few seconds if the computer doesn't detect that the engine is cranking. However, having the key on will prevent other electronics, such as the body controller, from going to sleep, which can still run the battery down, albeit at a reduced rate. Some cars will detect whether anything is happening and further shut things down. On an older car, current will continue to flow, and the battery will run down much quicker.
As others have said, there was no harm to the starter from leaving the key on. But if you had to beat on the starter to get it to turn, it's likely to fail soon. I've had to do this on many cars when I was younger to get a few more starts from an ailing starter.