Many countries find it useful to encourage some behaviors and discourage others by means of tax policy. Not just the US, although the US seems to do it quite a bit.
So we have, or have had, tax policies in the US that encourage home ownership, marriage, donations to charity, long-term investment, purchasing electric vehicles or electrifying your house, and more. The results of each of these is mixed, and sometimes contentious, but they're all there because congress decided at one point or another that a thing was worth encouraging or discouraging.