It is a common refrain on this forum from some posters that 'there could be a 50% crash in the stock market!', 'bonds have peaked!' or 'hyperinflation is coming!'. In general, volatility and uncertainty is commonly equated to 'risk'.
With the implication that the best strategy is to stay in cash or gold (of course, if you really think hyperinflation/fiat currency collapse is coming, getting a HUUUUGE 30yr non-callable fixed rate mortgage and investing the proceeds would actually be a great strategy IMHO, but I digress).
I think we agree with the OP that IF* your choice for a marginal 'stach dollar is limited between either paying off a bit of a 4% mortgage vs buying short dated US treasuries yielding 0.25%, the mortgage is probably the better option. Sure. [tho' even this most basic thought experiment implies a whole heap of 'all things being equal/liquidity/location/cashflow/no other debt' type assumptions, hence the 4 pages of follow up discussion].
The assumptions create the 'answer' that 0.25% < 4%. The issue is actually with the implicit conclusion that therefore, the OP's decision to pay off their mortgage is the best & lowest risk decision from an investment strategy point of view, and anyone who does not agree with that action is incapable of understanding basic mathematics...
That in the past few years, many posters have espoused a 'strategy' of holding a large % of cash over a diversified AA tax-optimised investment portfolio and have been proven incorrect in terms of subsequent total returns doesn't seem to make a blind bit of difference.
I guess fear and loss aversion are more difficult to overcome than I thought, perhaps especially when you have only a really small 'stach that you've had to struggle to assemble and you're simply super afraid of loosing it?