First of all, I assume that you mean that you want to know why a firm would continue to produce MORE of its good when marginal costs are rising. Assuming that is the case:
A firm might want to keep increasing its production after marginal costs are rising because firms do not maximize profit by minimizing marginal costs. Put differently, keeping MC low is not the most important thing.
Firms maximize profit by producing the quantity of goods where the MC of the last unit produced is equal to the marginal revenue gained by selling that last unit. This MR = MC point is the point where the firm is making the most possible profit.
Therefore, the only thing a firm needs to worry about is making sure MR = MC, not making sure that MC is at the minimum.
On the link, scroll down to where it says "Marginal Cost-Marginal Revenue Method."