It's total BS though. If you have enough money to waste any significant amount on gambling, then you also have enough to save that same significant amount.
I don't think it's necessarily the worst thing if you waste like $10 a month playing the lottery, that's not why you can't afford a home. But if you're spending like $100+ a month gambling that is absolutely a big part of why you can't afford a home. Sure maybe you'll never afford a home in New York. Live elsewhere then. There does exist more modest housing. If you're working in a city earning too little to live there then you're doing the wrong thing. Move out of the city. Yes it is that simple, and no I don't give a shit if that's where you want to live. If you can't afford it you can't afford it. Gambling won't help.