Hillary would surely have lost against any middle-of-the-road Republican candidate. History will note that she was an arrogant but incompetent Democratic candidate who lost against a rather bad Republican candidate, one who lacked support even from his own party. Trump won barely, but she lost completely.
Seen from the perspective of power centers Clinton once had all the support she needed. But she then lost a decisive group due to her uncompromising neo-conned foreign policy. Here is an interesting take based on a theory from the 1950s:
[T]he power elite can be best described as a "triangle of power," linking the corporate, executive government, and military factions: "There is a political economy numerously linked with military order and decision. This triangle of power is now a structural fact, and it is the key to any understanding of the higher circles in America today."That is only a rough take. The corporate factions are divided within. The oil industry does not like it when wars disturb its long term businesses (see Russia and Libya). Boeing wants to sell planes to Iran. Other corporate parts don't mind such wars as long as they create new markets or easy access to cheap labor. The media love war as it creates ever thrilling content around which they can sell advertisements.
The 2016 US election, like all other US elections, featured a gallery of pre-selected candidates that represented the three factions and their interests within the power elite. The 2016 US election, however, was vastly different from previous elections. As the election dragged on the power elite became bitterly divided, with the majority supporting Hilary Clinton, the candidate pre-selected by the political and corporate factions, while the military faction rallied around their choice of Donald Trump.
The decisive political point in this election round was the fight between neo-conservatives/liberal-interventionists and foreign policy realists. One side is represented exemplary by the CIA with the U.S. military on the other:
A schism developed between the Defense Department and the highly politicized CIA. This schism, which can be attributed to the corporate-deep-state's covert foreign policy, traces back to the CIA orchestrated "color revolutions" that had swept the Middle East and North Africa.