Government entities can file for and own trademark registrations (I blogged about an application for the Navy's NCIS badge a few years ago, for example), but there are some statutory restrictions. Section 2(b) of the Lanham Act prohibits the registration of any mark consisting of or that comprises "the flag or coat of arms or other insignia of the United States, or of any State or municipality, or of any foreign nation, or any simulation thereof." 15 USC 1052(b); TMEP 1204.
For example, the Seal of the President of the United States and the Department of Commerce seal cannot be registered as trademarks (even if the president or the Department of Commerce is the applicant). TMEP 1204.02(b). However, the Trademark Trial and Appeal Board has held that "department insignia which are merely used to identify a service or facility of the Government are not insignia" equivalent to the "flag or cost of arms" of the United States and may be registered as trademarks. In re U.S. Dep't of the Interior, 142 USPQ 506, 507 (TTAB 1964). The insignia of municipal law enforcement offices falls within this exception.
These applications are another example that it is not only private consumers who benefit from a federal trademark registration. Governmental entities can benefit as well.