Up until recently, I ran a 5E game for five players: a sorcerer, two wizards, and two warlocks (all level 3 humans). All five are familiar with 5E. This is my first attempt at running an ongoing campaign (I would consider myself as a relatively new and inexperienced GM). In my homebrew setting, all magic had been outlawed due to a coup attempt on the crown about 20 years ago by the different academies and organizations devoted to magic. Everyone elected to play a spellcaster and in some way was working towards reshaping society's view on magic in order to convince them that it could be used for good - not just for evil - and should be made legal once more. This common motive helped to cement the five player characters, who were all strangers to each other (aside from the two wizards who were played by brothers in real life), together into a party with a united goal.
We had no formal session zero, but much of my intent was explained beforehand personally to each player. We also had a discussion of the major session zero expectations for about half an hour before kicking off the game. At the start, I let everyone know that I was running a game with a good mix of combat and roleplay, but that there would be a significant amount of political intrigue as time went on. Each warlock had their own patron's motives and requests to consider. The wizards were approached by an underground magic guild dedicated to supporting the casters that were actively trying to restore legal magic to the kingdom. The sorcerer was an operative of an organization from a neighboring, rival kingdom that was working to destabilize the first kingdom from the inside in hopes to weaken the forces of law that prohibited magic. None of the players nor the player characters knew the details of the others' involvement with these organizations/patrons.
In an attempt to make the campaign more personal in the early levels, I constructed goals or side quests for each of the four groups (wizards, warlock 1, warlock 2, sorcerer) in the form of tasks or quests. The wizards were to break a caster from the underground guild out of prison and smuggle him out of the city undetected. The first warlock was tasked to find an enchanted weapon (a rarity when magic is illegal) for his patron, and the second was tasked with slaying a magical monster (also a rarity). These all went over well with the group.
The sorcerer's side quest really caused problems with the group on both a character and a player level. The task given to the sorcerer by her organization (and by me as the GM to the player in secret) was to sabotage or destroy the contents of a caravan of supplies for the first kingdom.
I communicated to the sorcerer's player that the goal of the mission was to sabotage or destroy the contents of a caravan, and to make it look like an accident if possible. The player turned around and communicated to the party that the sorcerer had received a task to sabotage, destroy, or ambush a caravan. Later, I gave more specific details about the size, contents, and guard detail to the sorcerer, who communicated that to the party as well. The warlocks responded neutrally, but the wizards both expressed that this was a bad idea. They, not knowing the sorcerer's backstory and only knowing the sorcerer's criminal background features, assumed that the organization the sorcerer was working for was criminal as well, and did not want to become criminals themselves by involving themselves in murdering a caravan full of guards (which is what they interpreted the mission as). The warlocks both said that they'd support the sorcerer and do the mission if the entire party went along with it, but didn't feel that it was a good idea otherwise.
As an aside, I designed this mission with a large number of guards in the caravan (which I communicated to the sorcerer's player) in order to encourage creative, non-combat approaches. I gave the players a good 4 to 5 days in-game and a couple of weeks out-of-game to come up with an approach to dealing with this, as well as an NPC recommending some locations on the road where it would be easiest to cause complications to the caravan.
One wizard's player responded very strongly, saying that their character would never involve themselves in something so criminal, and that to continue, the player would scrap his current character and make a Lawful Evil character so that everyone would be able to continue having fun and be able to agree to ambush and destroy the caravan. The player himself still didn't want to go through with the mission, but expressed that he was willing to look past that for the sake of the party and the game.
Simultaneously, the sorcerer's player expressed that since he wasn't receiving any support from the party and that since his character would never not attempt to do something her organization assigned to her (out of gratitude for getting her out of prison), he would also scrap his character and make a different character so that the party could move forward. I let the sorcerer's player know that if the mission wasn't completed, there wouldn't be very drastic consequences (giving him an out), but he insisted that his character would never abandon the mission.
Shortly after, the wizard's player expressed that playing in this campaign setting with such morally-ambiguous choices wasn't something he was comfortable with or enjoyed, as well as that he wasn't getting enough rest on the weekends when we played, and thus quit the game. The player's brother (the other wizard) also quit, mostly because his brother was the reason he was playing.
I was prepared to accept one or both players re-rolling new characters, but the wizard's player communicated that he had been considering quitting for a while, then decided to. I am still in the process of deciding whether or not the sorcerer's player will actually make a new character or not, now that half of the party is gone.
In short, two player characters cannot agree on a course of action, and are thus offering to re-roll new characters so that their motives can be more in line with the rest of the party's. I as a GM would like to avoid this if possible.
Numerous other issues aside, how might I be able to keep this situation (players unable to resolve their differing motives and reacting poorly) from happening again in the future, in a setting where the characters' motives might not align all the time, or might even be opposed?
Bonus question: What did I do wrong as a GM and how can I prevent it from happening in the future?