(It's linked at the bottom of this one, but I'm sure a lot of people don't get that far)
The inputs and assumptions made by the people selecting the math is the 'morally wrong' part.
Bias is real, like it or not. Your worldview, as a data scientist or programmer or whatever, impacts what you select as important factors in 'algorithm a'. Algorithm a then selects those factors for other people in the system, baking in your biases, but screening them behind math.