In the American League (AL), pitchers do not have to hit the ball. They have a designated hitter (DH) to do it for them. In the National League (NL), pitchers have to (try to) hit the ball. Since the two leagues actually play each other for some games each season (known as inter-league play) and of course for the World Series, you'll see AL pitchers almost never even swing the bat because they just might hurt themselves doing it. It's not at all uncommon to see an AL pitcher with a bat lazily resting on his shoulder, striking out just watching three fastballs down the middle of the plate. Even NL pitchers are almost invariably the worst hitters on their team, normally restricted to sacrifice bunts, and often replaced when their turn to hit comes up.
Some baseball purists argue against the DH rule, yet the fact is that the game is played at a lower level because of the pitchers hitting. Teams will deliberately walk the batter in front of the pitcher's spot (especially when there are already two outs in the inning), because the pitcher is such an easy out. The dilemma for the manager is between pulling a pitcher who's doing fine otherwise because he can't hit, or watching the pitcher waste an inevitable out. How is either outcome actually better?
The lesson of the DH rule is that, yes, in theory pitchers should learn to hit the ball, but the fact is that they can't and they don't. People who are in charge of rules and policies will do well to remember this. For example, in theory everybody would buy health insurance if they could afford it. In fact, a lot of people won't buy health insurance if they can wait until they're actually sick, and their logic is admittedly pristine. Just as wanting baseball to be "pure" doesn't make it so, the DH rule and forcing the participation of people who are too stupid or too selfish to understand how insurance works are the ugly solutions to ugly problems. The purists and the puritans, on the other hand, have no solution to either problem except to complain.