I generally find that setting up dev environments to be easier and cleaner in Linux. I prefer standard distro packages compared to homebrew and all it's quirks. There's also native support for docker. If you're doing backend stuff, it also helps that the machine you're developing on is using a similar OS as the server that's going to be running your code in production.
If it's for your workplace though, evaluate whether it's worth disrupting your workflow to make the switch. Don't let your productivity suffer because of it. Maybe test it out in your own free time and make gradual migrations. For a long time, I was dualbooting between Windows and Linux, and I've slowly migrated over.
Actually I have a work laptop now, so my personal M1 (which I give a lot of credit for my journey to becoming a developer) is kind of collecting a bit of dust now.
And yes, the point you mentioned about running the same OS as backend servers/infra, it touches on why I would try it out. Again, I’m not unhappy with Macs but there are knowledge/productivity gains that would come with learning Linux which will help with my career, even if it’s a little.
If it's just collecting dust anyways, just give it a go! And don't stress about getting it set up fast or perfect on your first try, see it as a fun and interesting project and familiarise yourself with the OS. Maybe check out a few different distros and DE's before you decide on what to settle with.
Yeah, then I'd say that dusty M1 mac is perfect for experimentation. I will say my Linux experience came in really handy at my work place (software eng), so go for it! Spin up some servers, do some self-hosting, etc. I feel like the only person who can decide whether Linux is for you is you, and if you run into any trouble, the Linux community is here to help you out.