Want to know why? COAST GUARD can act as a law enforcement division

https://en.wikipedia.org/wiki/United_States_Coast_Guard#Authority_as_a_law_enforcement_agency

On 25 November 2002, the Homeland Security Act was signed into law by U.S. President George W. Bush, designating the Coast Guard to be placed under the U.S. Department of Homeland Security. The transfer of administrative control from the U.S. Department of Transportation to the U.S. Department of Homeland Security was completed the following year, on 1 March 2003.[25][26][27]

...

The U.S. Coast Guard reports directly to the Secretary of Homeland Security. However, under 14 U.S.C. § 3 as amended by section 211 of the Coast Guard and Maritime Transportation Act of 2006, upon the declaration of war and when Congress so directs in the declaration, or when the President directs , the Coast Guard operates under the Department of Defense as a service in the Department of the Navy.

...

. "It reinforces the Coast Guard maritime strategy of safety, security and stewardship, and it reflects not only the global reach of our maritime services but the need to integrate and synchronize and act with our coalition and international partners to not only win wars ... but to prevent wars," Allen said

This authority is further defined in 14 U.S.C. § 89, which gives law enforcement powers to all Coast Guard commissioned officers, warrant officers, and petty officers. [30] Unlike the other branches of the United States Armed Forces, which are prevented from acting in a law enforcement capacity by 18 U.S.C. § 1385, the Posse Comitatus Act, and Department of Defense policy, the Coast Guard is exempt from and not subject to the restrictions of the Posse Comitatus Act. [31]

Further law enforcement authority is given by 14 U.S.C. § 143 and 9 U.S.C. § 1401, which empower U.S. Coast Guard active and reserve commissioned officers, warrant officers, and petty officers as federal customs officers.[32][33] This places them under 19 U.S.C. § 1589a, which grants customs officers general federal law enforcement authority, including the authority to:

(1) carry a firearm; (2) execute and serve any order, warrant, subpoena, summons, or other process issued under the authority of the United States; (3) make an arrest without a warrant for any offense against the United States committed in the officer's presence or for a felony, cognizable under the laws of the United States committed outside the officer's presence if the officer has reasonable grounds to believe that the person to be arrested has committed or is committing a felony; and (4) perform any other law enforcement duty that the Secretary of Homeland Security may designate.

— 19 USC §1589a. Enforcement authority of customs officers[34]

The U.S. Government Accountability Office Report to the House of Representatives, Committee on the Judiciary on its 2006 Survey of Federal Civilian Law Enforcement Functions and Authorities, identified the Coast Guard as one of 104 federal components that employed law enforcement officers.[35] The report also included a summary table of the authorities of the Coast Guard's 192 special agents and 3,780 maritime law enforcement boarding officers.[36]

Coast Guardsmen have the legal authority to carry their service-issued firearms on and off base. This is rarely done in practice, however; at many Coast Guard stations, commanders prefer to have all service-issued weapons in armories when not in use. Still, one court has held that Coast Guard boarding officers are qualified law enforcement officers authorized to carry personal firearms off-duty for self-defense.[37]