I got the new MacBook Pro 14" recently.
The MacBook Air I got back in 2013 was starting to show its age finally with a quickly draining battery, limited available storage, and even the speed was starting to become noticeable. I got a LOT done on that machine: learned to code, built a startup, made some funky side projects. It was an expensive purchase for me back in the day, but well worth the cost.
You absolutely are not required to code on a Mac (well, unless you're an iOS developer), but they are nice machines and the industry caters well to them. It feels a little like a splurge in the moment here too, but now I am a professional and I expect to get a LOT done on this machine too.
Setting up your dev environment is either exciting or a chore when you get a new machine depending on how you feel about it, but it is necessary to set yourself up for success.
Here is a fantastic run-through for how to set up your Mac: Mac Setup for Web Development 
I didn't follow every step exactly, but it is a great list to look through improvements to your Mac even if you've had it for a while.
Some new services I'm using as a result: