A well-known glaring exception with .edu is Academia.edu, which is a commercial paper repository/"social network".
.mil and .gov have always been controlled by the US government,.and since 2013 local governments in the US may register a .gov domain.
> The URL had been registered back in 1999, before 2001 regulations restricted the “.edu” designation to accredited higher educational institutions. “[D]espite its misleading top level domain,” noted Kathleen Fitzpatrick (2015), head of scholarly communication at the Modern Language Association, “Academia.edu is not an educationally-affiliated organization, but a dot-com.” Like other prior domain filings, Academia.edu was grandfathered in, granting the startup a time-sealed patina of nonprofit credibility