The movie takes a lot of ridiculous liberties that the hacks in Hollywod determined would make it more palatable to an American audience. Whatever it's virtues as a film may or may not be, as history it's pretty awful.
The book it's based on, Horse Soldiers, sticks much closer to the facts, but also distorts the record to make it look like the American soldiers played more of a leading role than they did. Those soldiers were extremely brave and capable men, but Stanton doesn't seem to have spoken to many of the Afghans involved in the campaign. So he has a very skewed vision of who played what role.
It's worth remembering that ODA 595 was a 12 man team, and took no casualties in this campaign (they would go on to lose men in Iraq). They linked up with a force that swelled to a couple thousand Afghan fighters, and which took hundreds of casualties. That helps put in perspective who was doing the vast majority of the fighting.
Interestingly, the Afghan commander ODA 595 linked up with, Dostum, was convinced (as many others were) that the US had very little tolerance for casualties. Many looked at what happened in Somalia in 1993 and concluded that if American soldiers started dying the force would quickly be withdrawn. He was determined to keep the SF soldiers liaising with him safe, fearing that American commitment would evaporate quickly and he would lose the phenomenal air support capabilities they had brought. Far from quarreling with them and abandoning them to take the jewel of the north, Mazar-i-Sharif, by themselves, he remained committed to protecting them. Mazar fell to American bombs and Afghan close assaults.
Here's just a very short list of some of the errors in the movie:
The team commander's real name was Mark Nutsch. The team's second in command was Bob Pennington, who was not wounded and airlifted out.
Nutsch did not accuse Dostum of being careless with his men's lives. Dostum's force was significantly smaller than the Taliban forces they were facing, and they didn't have the extra men to spend anyway. Dostum was not an amateur soldier. He had been at war almost constantly since 1978.
Dostum did not throw a hissy fit upon being told that ODA 555 was working with Mohammed Atta. First off, Dostum himself encouraged splitting off SF groups to liaise with other commanders. Second, ODA 555 was nowhere near Atta. They were busy working with Hamid Karzai, trying to make it look like he actually had a military following so that when the Bush administration tried to install him as interim president he would have more clout.
ODA 595 did not take Mazar by themselves. The vast majority of the Taliban forces had abandoned the city because American air support had made it untenable. A fanatical rear guard of foreign fighters made a last stand. They were crushed by American air support and Afghan assaults. There was no counter attack to repel. The Taliban leader in the north was not killed. (He winds up in Guantanamo Bay, until being traded along with 4 other men for Bowe Bergdahl).
ODA 595 doesn't go home after liberating Mazar, because the campaign isn't over. The Taliban forces in the north have not been crushed yet, they have retreated to their stronghold in Kunduz to the east. Over the following weeks, after being surrounded by Afghan forces and pummeled by American air support, they surrender. There's a lot of controversy over what happened to many of those prisoners, but that's a different story.
Anyway, long ramble there, apologies.