Surely this would be done in cruise. The same phase of flight where it's typical and accepted for one pilot to go to the lav, leaving the other one to handle emergencies solo.
If this was done during departure/arrival, then I agree that it was a terrible lapse of judgment.