Rather it's about end-user security habits, their credulity of arbitrary domains, and the mental load of noticing risks.
Imagine the IRS had an online payment portal, do you believe it should it be advertised as pay.irs.gov or as paymytaxes.com? (Or perhaps pay-my-taxes.com or pay.taxes.com is the real one?)
The TLD can change domain records at will. Change the NS and DS records, and you control the domain. Control the domain, and you can get a certificate.
If the ccTLD is sophisticated, they might carefully target the changes, but maybe not.
It would be bad for business, for a TLD to become known to hijack customers' domains. But, maybe its worth it, if you can steal a bunch of US identities?
The `.gov` tld is explicitly for US gov tasks. Whether the service is trustworthy or not is a different question. Whether it makes sense to use an external service for identification is another.
But if it's used for official means, they should at least get a branding contract and brand and host it properly. If only because the governance of `.gov` can and should be used to mark things official.