Strikeouts and walks are essentially the only things the pitcher has control over*. Once a ball is hit the outcome is up to the hitter, while the pitcher has very little to no influence on it. The defense and ballpark exert their influence as well of course.
Pitchers have very little if any control over their BABIPs, and have only a small amount of control over their home run rates. Hitters have a lot of control over their BABIPs and almost complete control over their home run rates. Hitters also have a lot of control over their walk rates. So hitters can do things that compensate for strikeouts. In major league baseball, high strikeout players outproduce low strikeout players in general, which is counter-intuitive for most people.
All the best pitchers have excellent K/BB rates, while almost all the worst pitchers have poor K/BB rates. Strikeout rate is a nearly infallible predictor of whether or not a pitcher is good or bad.
Many of the best hitters strike out frequently. Many of the worst hitters rarely strike out. Strikeout rate is not a good predictor of whether or not a hitter is good or bad.
* Pitchers have some control over their GB:FB ratio, but that doesn't have too much effect on their overall results in terms of ERA, certainly nowhere near as much as their K/BB ratio (or K%-BB%).