Everyone has made some good points, but I have to say the Marines are fraught with the most risk. Here is why:
1. Marines are fewer in number, and not all are stationed on starships or embassies. As a percentage, they would suffer the greatest number of casualties.
2. Marines come when all else has failed, which mean they come into a combat situation instantly. That requires a different set of skills and tactics that would be found with Security. Marines are taught to advance towards an enemy, hold territory, and break ships and beings.
3. Marines are not always warriors. They can fulfill many roles, such as Engineering, construction, winning hearts and minds. These roles can also place them at great risk.
4. In war, you need a force who can take the fight to the enemy, deliver as much punishment as possible, and achieve the objectives set out by Starfleet and the Federation, and the Marines are best suited for such operations, both long and short term conflicts. When you need to hold a planet, an embassy, or a starship, it's the Marines who get the call.