Exactly so. And economists have shown time and time again that allowing producers to maximize their profits while simultaneously allowing consumers to maximize their utility on a free market generates the greatest good for the most people.
Unfortunately, the math behind this though not complex is too much for those with five-minute attention spans. So occasionally the people make the horrendous mistake of implementing a socialist-style alternative, which generally gives them the consumer paradises we see in places like Cuba, North Korea, or the former Soviet Republics.