Corporations are supposed to do whatever their shareholders want.
The default assumption is that shareholders want to maximize profit, but shareholders can also want different things.
In any case, even the most ruthless capitalist society imaginable is not made out of corporations alone. Corporations are just a legal shell. People work for them, people own them, people buy their products, etc.
In a true profit maximizing meritocracy some disabled people might not get a job (though they still might, at lower pay commensurable with their productivity). [0]
But there's nothing stopping people from (a) charitable giving, or (b) enacting laws to give tax payer funded assistance to disabled people.
(You might argue with (b), but you can't really argue with (a).)
[0] Compared to eg someone like John von Neumann, I'm an idiot, but I can still find work even with my comparatively weak intellect. I just can't expect as much pay as John von Neumann would warrant. Of course, that pay might in principle be low enough that people can't survive on it. That's where charity and/or public assistance comes in.