I do agree that "forcing" a behavior is wrong. However, I don't disagree with them trying to "push" or reinforce a behavior. Breastfeeding is so much healthier for the child when possible.
That being said, some women have trouble breastfeeding... however I believe that is usually due to medications and most of those could be stopped for the breastfeeding. I know this because my wife is about to give birth and she stopped taking one of those medications specifically so that she could breastfeed.
IMO they should always go towards the breastfeeding, however, being a hospital they should always have the formula on hand for those who still decide not to.
Also, keep in mind these "free formulas" are purely marketing at the beginning. The companies supply this free formula so that it influences the decision on what to do with the health of your child.
I can give you an exact example of why hospitals should have formula.
My wife was in labor for 14 hours.
Heartrate of my son started to drop with every contraction and she was only 7cm.
Ended up in an emergency c-section. They assumed the epidural was enough. They cut into my wife and she about jumped off the table because she could feel it.
To get her through the c-section, they pumped her full of morphine. Within minutes she was covered in red hives. Yep, we didn't know she was allergic.
They pumped her full of antihistamines via IV.
If you know anything about breastfeeding, you should know what happened next. My wife couldn't product shit for milk. My son was jaundice. He ended up on some amount of formula until my wife could produce enough milk. And to even get that to work, she had to get a prescription from australia because the FDA does not approve the drug she needed for increasing milk supply. The FDA pulled it from the market because if used intravenously, it can cause cardiac arrest.
So yeah, I believe mothers should breastfed. But they also shouldn't feel like shit if they can't. As for the comment about evolution pointing to everyone being able to breastfed, that is a bullshit argument. My son would probably not be alive if not for modern medicine. Child birth was the leading cause of dead for women and infants until recent history.