A firm in perfect competition won't increase its output without limit even though it can sell all it wants at the going price. Why not?
This is because if they keep on increasing their output they run into increasing marginal costs and/or they run out of capacity.
In the sort run, firms can not increase their output without limit. If they do, they will increase their marginal costs. This is because they will start to outstrip their capacity to produce. Since we are talking about the short run, they will not be able to increase that capacity.
Let's look at t-shirts again. If you have 3 sewing machines, you can't just keep increasing your production infinitely. Pretty soon you get to a point where you are producing to the full capacity of your machines. Then what? You could hire some people to do hand work, but that will increase your marginal costs. Or you just run up against the limit of your physical plant.
Either way, you can't keep increasing output indefinitely.
A firm in perfect competition does not increase its output without any limit although it can sell all it wants to at the going prices, because at some point the incremental per unit variable cost of procuring and selling the product is more than the going price. This results in reduction in the firms profit with increase in sales beyond the optimum sales volume.
Perfect competition or no perfect competition, no firm will increase its output or sales without out limit. First and foremost it is impossible to do so. Without limit means infinite, and no firm can increase its output and sales to such high levels. Further, if a firm was able to produce economically quantities equalling or exceeding the total market equilibrium quantities, the market will no longer remain a perfectly competitive market, because in such a situation, a single firm will be able to influence the market supplies and prices.
The quantities produced by any single firm operating in any type of market, competitive or otherwise is determined by the marginal cost and marginal revenue curves applicable for the firm. Typically the marginal cost curve of a product for any firm is a U-shaped curve. This mean the marginal cost is high at lower volumes and reduces as volume increases till it reaches a minimum marginal cost. When the output is increased beyond this point, the marginal cost begins to rise. In general, the firms in competitive market reach the point of the minimum marginal cost at a sales which represents a small fraction of total market demand. In comparison, the monopolistic firms are likely to have the point of minimum marginal cost, at output levels near to or exceeding the total market demand.
All firms produce ans sell at levels where the marginal cost for the firm equals the marginal revenue. This is the level at which the firm maximizes it profits. If a company exceeds this level of output. The differential cost of production will be less than the differential revenue. This will lead to reduction in its profit.