Only because there are marines in Earth's forces doesn't mean they are part of Federation Starfleet as well. It is made of several species with a longer military tradition in space than Humans. Maybe to Tellarites, Andorians and Vulcans marines are superfluous or anachronistic?
The Federation is not a homo sapiens-only club.
True, things shouldn't be kept just because humans do them, but in this case it's more a matter of practicality. "Marines" are a specialized case of infantry, i.e. ground troops -- specifically those attached to naval operations or involved in amphibious warfare. In an interstellar setting, with starships as the basis for any travel from planet to planet, it stands to reason that any infantry -- troops assigned to fight on planet surfaces or conduct boarding operations on enemy ships or stations -- would most likely be the equivalent of marines.
Now, if we're talking SF universes or futurism in general, one could suggest that the very concept of ground troops might eventually become obsolete, with drones taking their place altogether. In that context, there'd be no infantry and thus no marines. But Star Trek
has always been oddly devoid of robots, and the norm has always been to employ live security guards/troops. So it would make sense, at least hypothetically, that there could or even should be a specialized infantry force that would most likely be called either marines or naval infantry. (Although the etymological purist in me insists that starship infantry should be called "Celestines" instead. Except then they sound like a religious order.)
Again, though, Trek canon doesn't support that view; what we've always seen is that the same security personnel handle both shipboard duties and an infantry-like role. But then, this isn't necessarily a problem. Historically, quoth Wikipedia
, "The Marine Corps was founded to serve as an infantry unit aboard naval vessels and was responsible for the security of the ship and its crew by conducting offensive and defensive combat during boarding actions and defending the ship's officers from mutiny." This doesn't sound too different from the role of starship security officers, although mutiny in Starfleet is reportedly a near-unprecedented occurrence. And in modern times, US Marines serve as security at US diplomatic posts abroad. So I'm comfortable with the idea that Starfleet Security already is essentially a marine/infantry force by default. Indeed, one could argue that that's their primary function, and that the kind of ship-to-ship tactical role we've seen characters like Worf and Tuvok perform is in addition to that basic infantry-type role.