I can find the answer from a table but I can't explain why that's the rule.
Accepted answer
Because marginal reasoning tells you whether the *next* unit is worth making.
If MR > MC, that unit adds more revenue than cost, so producing it increases profit — keep going. If MR < MC, that unit costs more than it brings in, so producing it shrinks profit — cut back. Profit stops improving exactly where MR = MC.
On a table you'll often see profit peak at the last quantity where MR ≥ MC, which is the same answer. One caveat: MR = MC gives the best *quantity*, but a firm should shut down in the short run if price is below average variable cost, since it can't cover the costs it could avoid by producing nothing.