It's a collective pool to which you contribute which is used for both purposes, you bear some responsibility for both actions by extension.
> since one could willingly contribute to only those aspects of government which are considered good and to none of the other ones (which are considered bad, knowingly or unknowingly).
No, they couldn't, your option to contribute to the state is violently coerced and the allocation after it is violently coerced is out of your hands. You can play games imagining your money went to a nurse instead of a CIA black ops mission to overthrow a popular foreign leader and prop up the interests of your state in the region, but at the end of the day that's all that is, a game.
> so why should it be permissible to unknowingly and unwillingly support bad corporations?
It isn't; you are responsible for the repercussions of that 99c hamburger, act accordingly. You're right that's the only consistent position, and you're right that it implies that people are responsible for the actions of the entities and organisations which they support.
If you simply ignore material reality and obvious facts so you can ignore having to deal with the cognitive dissonance that comes from contributing directly to behaviour you despise, then you're once again just playing games. It's your responsibility to make your decisions and your responsibility to examine the repercussions of those decisions, I understand that the concept of personal responsibility is completely alien to the vast majority of statist humans in existence, but that doesn't stop it being the only path I am able to accept.
The knowingly or unknowingly bit gets slightly harder however since it's not completely beyond the realm of imagination that you might trust a party with which you choose to do business to behave in accordance with your expectations and standards. However, the difference there is, once it becomes clear they've violated that trust, you retain the option to cease your dealings with them.
No matter how many times the state violates that trust, you do not acquire that option, your option is the same as it was to begin with, serve or die.
You do have options though. Go somewhere that has no state, convince the people to disestablish the state (oh, and somehow prevent them from re-establishing one), or go somewhere that has a state that you would be willing to serve.
Hey if you don't like your gang just join another one. Or convince all the other gangsters to quit the gang and all people everywhere to never start a gang again. But don't think for a minute you can stop following orders from the Don.
I wish I could tell you the world was different, but it's not. We live in a real world, not an utopia. No matter where you go there will be some variant of the 'despot with a stick', whether they call themselves guv'nah or not.