They're doing what they love, which is #goals. They do have a life, it's just based on a subject that you and I (and most people) wouldn't tackle too much.
I study applied maths, and I can asure you that proofs can absorb you for years, even to a point where you forget to eat, sleep,etc. just for the sake of finding the answer. Especially proofs like this one, that remained unsolved for centuries.