taxes - 401k contributions defer taxes (or prepay for a Roth account), and there’s only so much tax-advantaged space available
investment options - 401k plans have limited fund selection, but many are good enough
If you’re planning to invest 5% regardless, choose the account that gives you the best tax advantages that matches your investment plan. For most, that’ll be the 401k in an S&P 500 or total US stock market fund. If the fees aren’t too bad, I’d absolutely go with the 401k.
If you’re in the 12% or below bracket, I recommend Roth if it’s available. If you’re above, deferring taxes is probably the better plan. If your funds are super expensive (say, >0.5% fees for an index fund), you might be better off in a taxable account.