Question: Why do most programmers/developers use a dark theme while writing software/code?

Answer: Because light attracts bugs.

@nixCraft

Easier on the eyes...

Prolongs the life of your LED screen, particularly if it's OLED.
@ferricoxide @nixCraft It’s actually from before LED screens, CRT screens had a hard time providing non flickering white backgrounds.
Which is why I find it weird that people choose dark today, proper white works just fine now.
@helge
Probably a combination of force of habit and people who never use light mode regurgitating the idea that dark modes are better as if it's not just an opinion
@ferricoxide @nixCraft