Actually the concept of Marines was to maintain discipline aboard ships of the United States Navy. They provided the Captain of a Naval vessel, a small security force capable of putting down a mutiny. The shipboard marines also schooled the sailors in the use of small arms, guarded the captains quarters, guarded the powder magazines, and small arms lockers. In battle they were used as snipers from the top platforms and were part of boarding parties if required.
Well yes ,but in the larger scheme Marines were sent to “the shores of Tripoli” when deploying the Continental Army would have been logistically and politically more difficult.