Lower margin, but higher volume. Plus a subset of the buyers will subscribe to Apple Music, buy apps from the App Store, etc.
I am surprised that they only do it now, since Mac marketshare growth has stagnated for a long time and it's even hard to grow the iPhone marketshare. Growing the Mac marketshare by making very competitive models is one of the best ways for them to grow and to grow services fees.
I think the problem was Apple management was too obsessed with the iPad, believing they would replace laptops.
If they had really thought the iPad could replace laptops they would have tried harder the way Microsoft did with Win 8.