I've asked my students whether they still want to learn maths even if there will be a machine that will answer any question instantly and they will be homeless. They said yes.
(To my credit, I have warned them since more than a year ago that we will reach this point.)
But are any of them going to be able to do any significant amount of studying maths without being homeless?
Why not? Maths studying correlates with high intellect, high intellect correlates with competitiveness in the job market. So their chances of finding a job that would allow to have much of free time (for doing math) without being homeless are pretty good.
your students are crazy (neutral term); no one should learn maths if the condition is that they will be homeless and exposed to the elements. the will to subvert the hierarchy of needs is commendable
(To my credit, I have warned them since more than a year ago that we will reach this point.)