Today's rates show the 3-year yielding 284bps and the 5-year yielding 283bps (the same as the 2-year) [1]. Let's consider three hypothetical buyers' outcomes. To keep things simple, we'll assume interest isn't re-invested.
One buys the 5-year. $10,000 of their principal would turn out $1,415 in interest [2]. Another buys the 3-year, keeping the principal as cash on redemption. $10,000 of their principal turns into $852 in interest [3]. Immediately, you see why the 5-year is a better buy for a 5-year investment horizon than the 3-year.
Consider a third buyer. They buy the 3-year with the aim of re-investing. To get the $563 difference between the 5-year and 3-year total interest pay-outs, they would need to buy a 2-year bond yielding 282bps when the 3-year matures [4]. If rates are lower 3 years' hence, the 5-year investor will have done better. If rates are higher, the 3-year buyer with intent on reinvesting will have done better.
This reinvestment risk, which incorporates the market's views on future interest rates, is what the yield curve essentially reflects.
[1] https://www.treasury.gov/resource-center/data-chart-center/i...
[2] 2.83% x $10,000 x 5 years
[3] 2.84% x $10,000 x 3 years
[4] [($1,415 - $852) / 2] / $10,000
So the overall yield is not lower, just the annualised yield.
That doesn't sound like nearly as much cause for alarm.
What this means is that the bond market thinks available bond yields for cash-on-hand will be lower in three years than five, so they're willing to take a hit now to lock in the longer-term payout. That reflects serious economic pessimism.
We should instead talk about it in terms of expected instantaneous, or at least short-term, forward rates. For example, what is the expected rate for a three-month T-bill starting 1, 2, 3, 4, or 5 years from now?
So, why does this happen? Well, it happens when the markets expect interest rates to drop between now and five years from now.
Why might that expectation exist? Well, it might if bond buyers were anticipating a recession.
At least that is how I understand it. Feel free to correct me.
Your confusion is precisely why it's a bad thing. Ideally, longer-term bonds have a higher yield, as that would mean we collectively are investing in high growth over a long period of time. That is, the economy grows.
When the inversion happens, then the short-term bonds have a higher yield, which means something is wrong with the economy in the long term. We don't know what's wrong with it, it's just a signal.
A 5-year bond now has a lower yield than a 3-year bond? How is that even possible? Wouldn't anyone who wants a 5-year bond just buy a 3-year bond and then put the cash under their mattress after 3 years?
Is the idea that in 3 years' time, negative interest rates will be widespread, physical cash will be abolished, and figuratively keeping the cash under your mattress isn't even possible?
EDIT: And why don't arbitrageurs buy up 3-year bonds and sell 5-year bonds?