I see what you're saying, but public programs, even if you don't directly benefit from them, still have an indirect benefit on your day-to-day. Entitlement programs drive poverty down, which definitely reduces the likelihood of, for example, you being robbed in broad daylight. If you're man, even family planning programs like free IUDs, abortions, etc. end up producing an economic net positive for a state/government that would be preferential to the lack thereof.
But that's all perception. Because nobody thinks about the cost saving state funded contraception does, but rather the misguided moral and faux religious aspects of the topic. Perception is central to this idea of voting against your interests, but I wouldn't say a straight white male voting for a progressive candidate who wants to increase entitlements to minorities is necessarily voting against their interests.
A rural white voter in west virginia voting for a candidate who wants to make it easier for coal mining companies to play fast and loose with your health is voting against your interests.
But I see what you're saying, and I wish I could enunciate my point clearer but it would be significantly more long form