It's true that programming was not a top priority outside of survival, though to many programmers in Ukraine, it was still a major one.
This report (source: https://www.cnbc.com/2022/03/04/ukrainians-are-built-differe...) from CNBC in March documents this: "Those developers, along with other Ukrainian civilians in the country, are now being forced to defend their homes and cities while sheltering from Russian bombs. But many are still continuing to remotely work for their employers, supporting the local defense effort by day while sending in their deliverables by night.
“Yes our teams are sending deliverables from a f—ing parking garage in Kharkiv under heavy shelling and gunfire in the area. Amazing humans,” Logan Bender, chief financial officer at a San Francisco-based software licensing company, said in a story posted to Instagram on Tuesday by venture capital meme account PrayingforExits. "
I would personally prioritize survival over work at that point, and avoid praising sending deliverables in a warzone as a moral good (over ensuring the safety of your family), but it's evidence that even in extreme conditions, people still want to program as part of their work. As for why there would be a want to program in extreme conditions, some discussions on Reddit and Slashdot in response to the article suggested that programming was a way for these workers to get their minds off their current situation.