The story is better than that, though. He was working on one of his great novels as a serial (Crime and Punishment, I think), so he had to keep writing that during the day. But he had to produce another novel at the same time in order not to lose his future royalties to this publishing contract, which he had signed to pay off his own gambling debts. He was in despair, but a clever friend found the star pupil at the local shorthand academy and Dostoevsky dictated The Gambler to her in the evenings while she got it down in shorthand (a new technology at the time) and later transcribed it. They only had a few weeks, and finished it at the last minute, but the publisher had cunningly closed his office that day. He was no match for Anna, however, who took the manuscript to the nearest police station and got a receipt, rescuing Dostoevsky's career. Then he married her.
Similar tax advantages present themselves to those who borrow money using stocks as collateral.
Borrowing against a stock portfolio is nothing new. Margin loans have been around for a long time. But securities-based loans offered by Morgan Stanley, Bank of America, and other large wealth managers aren't margin loans. The proceeds aren't supposed to be used to buy more investments. Marketing materials commonly suggest using a securities-based loan to buy a vacation home, or cover retirement expenses, without needing to sell your investments.