Basically, how was Islam able to spread when there was conflict within the religion itself?
I think there are some factual answers to your question but also some conceptual problems with some assumptions I think you're making in asking it.
Factually, Shiism has always been the minority strain of Islam. Except for a brief period in the [edit] 9th 10th century when Shia dynasties predominated in Greater Persia and in Egypt, and the restraints on Ottoman expansion posed by the Shia Safavids/Qajars, Shiism politically speaking wasn't much of a challenge to Sunni ascendency.
To turn to conceptual issues, in the 8th century we can use the terms "Sunni" and "Shia" but we should be incredibly careful about ascribing a contemporary sectarian meaning to them. I've written about this before, for example in this thread about the emergence of the Sunni-Shia divide that may be of interest. To summarize, I think in the 8th century it's far easier to speak of dynastic supporters of the Alids than it is to speak of a Shia sect.
In that sense, the a proper comparative question might be something more like "How could the Roman Empire have expanded so much when it had succession disputes?" Succession disputes don't necessarily prevent a state from expanding.
Divisions within Sunnism I think also make it even harder to speak of a monolithic "Sunnism." In that sense your question, if anything, even underestimates the problem. Until the 12th century, infighting among the 4 predominant Sunni schools of Islam was as common as fighting between Sunni and Shia.
Bearing that in mind, my next conceptual question might be "So what?" Divisions within Islam, a religion, I would argue have as little relevance to the political expansion of Islamdom as do divisions within Christianity. Did the protestant reformation prevent or inhibit the expansion of Christian powers in their power over the entire new world and much of Asia? Did the continued schism prevent their expansion in the 18th and 19th centuries? Of course not. Nor should we be surprised that, say, the Ottomans expanded despite religious sectarianism within their own borders.