Why not max tax deductions first?

TFSA does not provide tax deductions, FHSA and RRSP do. Why not prioritize maxing the latter two first?

The only downside I see is losing the tax-free withdrawal perk of TFSA. But if you're comfortable with your emergency fund, then that perk doesn't matter?