The issue isn't simply buying condoms. If that were the case, the bill would be to give away condoms anywhere they are sold (which would be vetoed as well). The issue is that, for high school kids, they often don't feel comfortable going out to buy condoms. It's still seen as something to be ashamed of. So when they get into a situation where they need one, it's not available which can lead to obvious complications.
Providing free condoms at high schools gives the kids a guilt-free, anonymous way to protect themselves when they eventually have sex, which is going to happen regardless of what adults say.