For one, you can have demand that justifies wage X in a "perfect market" but keep wages - X through political and social means (from cartels and monopsony, to exploiting illegal immigration)...

Second, the minimum wage can increase consumption (poor workers wage almost go all to the market, not to wealth accumulation and rent-seeking), and thus lift demand.

Third, demand is in many sectors inelastic. A employer need a certain amount of workers to function, period. If he doesn't have them, he can either overwork existing employees (if the law permits it, that's why overtime compensation and related laws are important), or squeeze his profit margins and rise to the minimum wage.

But he'll seldom if ever voluntarily squeeze his profit margins to minimum wage if he can get away with it (and thus use employees as a profit source). In an ideal (for the boss) world he would be able to even use slave labor (as many did in the past), blackmail employees (as many who employ illegal immigrants do), collide with other owners in an era to keep wages low, and so on.

Actually that's the same way huge increases in productivity are seldom/never passed on to employees, but are pocketed as extra profit margins, which is why productivity has skyrocketed in many sectors, but wages remain stagnant or even lower than 70s levels (when adjusted).

Fourth, minimum wage law equally affects all businesses in a sector (or across the market), and thus the extra costs will eventually just be a cost of doing business that will be passed along to the overall price. Other conditions being the same, countries that introduced minimum wage laws, even higher than the US, do just fine with their unemployment.

Fifth, certain markets (and especially ones were low wage earners work at, from fast food to strawberry picking), have a single or a few large employers in areas, that kill competition, and force workers to accept whatever's given (regardless of what demand would point to). That's a monopsony market, and certain low wage markets like fast food have been shown to be that (can depend on area).

And we haven't even touched into the improved (sometimes substantially) conditions of those getting a higher wage (because the got lower than the minimum before), which could result in increased productivity.

Economists are not clear cut as you seem to believe: "The profession as a whole is divided on the topic: When the University of Chicago Booth School of Business asked a panel of prominent economists in 2013 whether increasing the minimum wage to $9 would “make it noticeably harder for low-skilled workers to find employment,” the responses were split down the middle." [1]

[1] https://www.theatlantic.com/business/archive/2017/01/economi...

-- which also mentions:

Looking at historical experience, there is no obvious relationship between the minimum wage and unemployment: adjusted for inflation, the federal minimum was highest from 1967 through 1969, when the unemployment rate was below 4 percent—a historically low level. When economists try to tackle this question, they come up with all sorts of results. In 1994, David Card and Alan Krueger evaluated an increase in New Jersey’s minimum wage by comparing fast-food restaurants on both sides of the New Jersey-Pennsylvania border. They concluded, “Contrary to the central prediction of the textbook model ... we find no evidence that the rise in New Jersey’s minimum wage reduced employment at fast-food restaurants in the state.”

Card and Krueger’s findings have been vigorously contested across dozens of empirical studies. Today, people on both sides of the debate can cite papers supporting their position, and reviews of the academic research disagree on what conclusions to draw. David Neumark and William Wascher, economists who have long argued against the minimum wage, reviewed more than one hundred empirical papers in 2006. Although the studies had a wide range of results, they concluded that the “preponderance of the evidence” indicated that a higher minimum wage does increase unemployment. On the other hand, two recent meta-studies (which pool together the results of multiple analyses) have found that increasing the minimum wage does not have a significant impact on employment. In the past several years, a new round of sophisticated analyses comparing changes in employment levels between neighboring counties also found “strong earnings effects and no employment effects of minimum wage increases.”