Why would you say that? Most devs I know dont loath their jobs and I know many who actually love it. Never heard dentists, accountants or schoolteachers sound as passionate about their craft as I have devs.
Just curious, but how many dentists do you know personally? I work in a field adjacent to dentistry and interact with many dentists daily.
It’s shocking to me how many of them are deeply passionate about dentistry and teeth/gums/etc. This may be a situation where I tend to mostly work with successful happy dentists, but the same bias may exist w/ you and developers.
Development is fun, but a lot of work involves non fun stuff, such as unreasonable deadlines, code reviews, grinding algorithms, being to learn a new language in a few hours.
I'd say it still is a lot of fun as long as you optimize for the fun bits and not the highest salaries.
And even when you write code the interesting bits are the minority of what you take care of. Writing tests, making sure that errors are handled correctly and CRUD take a significant portion of time and they are simply not interesting if you've been doing this for a while.