Both of them have the same aims (to fight the Ceph) and they're only after you in the single player because they're a rogue faction commanded by Lockheart with a personal grudge due to thinking you're Prophet who murdered scores of them. They at no point go after the Marines. In the multiplayer they're actually commanded by Strickland, who it turns out is an undercover CIA agent on the Marine's side, making this even more nonsensical.