It’s because the economic value of the option has two components: the immediate value and the time value. Might be easiest to see with a simple example.
Suppose you have a stock that currently trades for $100. This is a very special stock - you know that in exactly one month it’s either going to be worth $150 or $60. (Think of it like a single-drug pharmaceutical company whose major drug either will or won’t be granted a patent extension.) The odds are 50-50.
Now suppose you’ve got an option to buy the stock for $90 in exactly one month’s time. You could exercise that option now, paying the $90 exercise price and immediately selling the stock for $100, getting a net payoff of $10. That’s the option’s immediate value, equal to max(current stock price - option exercise price, 0).
But the immediate value isn’t the economic value of the option. Instead, it’s the lower bound of the option’s price - if the option ever traded for less than the immediate value, smart econheads could buy the option, exercise it, and immediately sell the stock for guaranteed immediate profit.
The economic value of the option takes into account that lots of good things could happen before the option’s expiration, which would make the option much more valuable. Lots of bad things could happen, too, but that’s ok because if the bad stuff happens, you’re not stuck with the stock, you just throw away the option without exercising it.
So in this case, you’d look at the two possible outcomes: the stock will either be worth $150 in a month or $60 in a month. If the stock ends up being worth $150, then an option to buy the stock for $90 will be worth $60 at expiration. If the stock ends up being worth $60, then the option to buy the stock for $90 will be worthless. If the probability of each outcome is 50%, then the expected value of the option is $60*.5 + $0*.5 = $30. (This is why higher variance/volatility makes options so much more valuable, even if they don’t change the EV of the underlying stock. In this example, if you ratchet up volatility so that the possible outcomes are $210 and $0, the EV of the stock is still $105, but the EV of the option goes up to $(210-90) *.5 + $0 * .5 = $60.)
So in this case, the immediate value of the option is $10. That’s what you’d get if you exercised early. But if you instead sold the option to someone else, you’d get the expected value of $30.