It’s legal (at least in the US) the government just advised every major exchange that they couldn’t uphold their KYC obligations with it so they dropped it.
But there is still a distinction between monero being banned and the government saying “we don’t believe you can fulfill kyc obligations”. There is a legitimate argument that yes they could that could be made in court, depending on the implementation.