Borrowing a small amount from a large balance to make an investment that you think will perform better than your 401k investments.
It’s generally not a good sign if you are borrowing for consumption related expenses, but even there, there are scenarios where it is probably fine. If you’ve been over saving in retirement accounts and your car breaks down, not the end of the world. The opportunity cost only applies to the funds you withdraw, not the whole account.