If you have a 401(k), yes. It's a way to turn a 25% credit card debt into a 5% loan.
The hitch is that while you can pay the credit card company over 30 years, the 401(k) loan is less than a decade, resulting in higher payments short-term, but money saved in the long term.
For the uber rich it is called "buy-borrow-die".
And this is why the idea of a wealth tax has so many tres comas types up in arms.