I was talking to an old professor and a former student of hers awhile back, and it was a very interesting discussion.
The former student was very spiritual and very much the intellectual. Her take on it, was that STD's and STI's weren't necessarily a punishment or something that's deserved, but more of a a warning sign to society that says "Hey, people. You're not protecting yourselves, and society as a whole is being too promiscuous and carefree, and that we should take things down a few pegs and start to think about what we're doing with our bodies."
She felt that you can't control people or what they're going to do, but if you're going to ignore the signs out there that are sending a message that people are starting to become too loose with themselves, the consequences of those actions shouldn't be something that surprises someone, but they shouldn't be a punishment either, because we all make mistakes.
I kinda stand by that notion. Nobody ever "deserves" to die or "deserves" to catch something that hinders their ability to live their life they way they chose, but there are some actions that people take and some paths that people either chose or allow themselves to go down that have highly predictable consequences given a certain set of circumstances. I've got a weird view on things, but I'm a believer of fate and free will. We have the ability to chose most of the paths in our lives (most, not all), and during our lives, we will all come to forks in the road. We can choose to continue on the same path, or branch off onto something new. For a lot of our actions and a lot of the things we as people and society do, the things that we will encounter on the roads that we choose to travel are pretty predictable. I mean, if a sign says "Warning! Icy roads ahead!" during the middle of winter, it's safe to say that we're going to encounter ice.
TL;DR: People don't really deserve STDs/STIs, but given some people's lifestyle choices, lack of self control, lack of awareness of vigilance, or other contributing factors, many (but not all) shouldn't be surprised if their yearly doctor's visit brings up an unsettling result.