One point to add to the excellent posts above. Because the Coast Guard has the legal authority of a law enforcement agency, they can conduct boarding and search operations which, if done by the Navy, could cause international problems. So Coast Guard boarding teams are carried aboard Navy vessels in trouble spots all around the world.
--Justin
--Justin