My wife and I did exactly that, again in the name of keeping reserves at the ready. A 401k loan is allowed only under a few conditions by our employer, and I'm not even sure who needs to approve it. Money in the bank is there for anything, anytime (barring unusual circumstances).
I agree it is a bad idea for most people, and most of the time. Depends on your beliefs and philosophy. If you are "all in" and expect 8% annual returns or more, then I would not recommend it. For us, I considered the following:
1) Our 401ks were mostly in cash at the time, making very little, and I did not expect that to change much in the near term (some say "risk averse", I say "value investor")
2) The % of the accounts we would borrow was close to what I would keep in cash no matter what (OK, maybe "risk averse")
3) The interest rate is low, and you pay it to yourself (if you're hitting the federal contribution limit, this gives you a little bit more beyond the limit)
4) My wife and I are conservative in our spending/lifestyle, and I know there's very little risk we would get "squeezed" by the mandatory payback upon job termination. We are unlikely to change jobs anytime soon (or at all, really), and will likely always have enough in the bank to cover it.