Governments who were once discouraged from investing in Bitcoin, are slowly becoming interested in it. They have learned from their mistakes. Some governments feel that if they had taken a positive view of Bitcoin earlier, they could have benefited more from Bitcoin investment today. Some governments have already changed their view on Bitcoin. They are now discussing how to become large holders. There may be start a competition in governments on how much Bitcoin they can accumulate. If governments can impose taxes on the use of Bitcoin, they will definitely try their best to legalize Bitcoin.
As OP said, they care and legalize it because they want to tax people who invest in bitcoin, not because they want to invest in it. So far, El Salvador is the only government that uses public money to invest in bitcoin, no other government has invested in bitcoin. They also never expressed regret for not adopting bitcoin sooner. Don't misunderstand or exaggerate the importance of bitcoin to the government, they don't need it as much as we think, their purpose is just to tax and control us more.
In the future, if the government wants to own bitcoin, it means they just want to diversify their national reserves. Governments and central banks do not speculate like us and institutions, they seek safe haven assets to protect their economies. That is why so far, despite many rumors about governments and banks planning to hold bitcoin, sadly no one has done it yet.