I won't argue with the data, but this "explanation" is ridiculous.
How do a guy's testicles "know" he's ugly?
After a certain number, enough sperm is enough - unless there is competition.
My theory is that there are more and better quality sperm when there is likely to be sperm competition - when the man is ugly, the woman is attractive, or there is a new relationship, and the fastest, most numerous team has the best chance of winning.
There are some weird things that happen. For instance, at least one study showed that later-order births within a relationship tend to produce smaller children, as if the man somehow adjusts baby size to make it easier on the woman when she is a long-term investment.