The problem is that markets have no way of determining the will of the majority of people.
A truly free market by definition is responsive to the majority (will) of the people. If the people like "A" over "B" in a free market, that is what they invest/buy/suggest/endorse etc.
Maximizing profits is not the same thing as determining what is best for society.
Really? Who determines what is "best" for society? You? Government? Corporations? In a free market the people decide what is important to them and that is the direction society goes. If the majority of the people choose to buy/use "A" then that is their choice and the will of the people will be the most profitable. You and I may not agree with it but if you truly respect your fellow citizen then you have to allow them their "Vote".
The belief that it is the same thing is what I call a religion.
Another definition of religion is when someone claims to know "what is best" for everyone else. You are exhibiting the exact behavior of those you are accusing.
Once society, through it's elected representatives, has decided on a course of action, truly free markets within a regulatory framework are the most efficient way to reach that goal.
You are 100% correct here, sir. Now, if you could just explain how you intend to ensure that those elected representatives are actually representing the will of the people. History clearly shows that representative government is a great idea that never works due to corruption. Therefore, it is reasonable to assume consolidation of power will result in corruption so power should be distributed as much as possible among the populace.
No solution is perfect, but I would argue that replacing selfish decisions due to corruption with selfish decisions due to personal interest is a step in the right direction. The decision may the the same or just as bad, but at least you are not contributing to the power structure of a select few.