As the comment you're replying to points out, that same opportunity cost applies to literally any non-essential ~$20 purchase they made with any currency in that time period.
Similar to the Monty Hall problem [1], the mistake you're making is calculating the opportunity cost at the time of sale, rather than within the context of perspective. Opportunity cost is dynamic, not static.
If I approached you in 2012 with two envelopes, one with $20 worth of US bank notes, one with $20 worth of Bitcoin, you'd most likely take the cash. If I approach you again in 2021 with the same envelopes (unopened) from 2012, only a fool would take the cash.
Speculative assets would not exist if your theory held water.
The critical difference between spending BTC on a pizza and the Monty Hall problem is that you only receive additional information once you no longer have any option to change your mind.
If Monty Hall asked you if you wanted to change doors before opening one the problem would not be much of a problem.
Except the OP was (almost certainly) in possession of $20 USD in 2012. The opportunity cost of buying that Pizza with Bitcoin rather fiat totals ~$34k at the time of comment.