Governments can require crypto exchanges to report all transactions to them.
US based exchanges report for multiple federal and state agencies.
In addition there is a US legislation which can force holders of their own private wallets (run their node) to reveal transactions as well.