I'm lucky in that I converted a rather fancy woodshed into an office/lab with lots of Ethernet ports so my work can stay in there. When I was I the house it wasn't as good since I could still hear the slack and email noises from the lounge etc.
This helps A LOT. I am also extremely lucky enough to have a separate structure on my property that acts as my WFH office. It's got a window, a closing door, two desks, enough room for plenty of monitors, gigabit ethernet, and is totally separate from the chaos of a home with kids. That 10 second walk from home to office is sufficient to get me from "home mode" to "work mode".
For me, it’s a combination of flexibility, avoiding a daily commute, and having my own private, focus-enhancing office as opposed to the interruption fest that is modern offices.
Orthogonal to the productivity argument, have there been any studies trying to find the motivation for people preferring/hating WFH?
My guess is you tend to prefer it if you have a social circle that's not your co workers and hate it if you don't.