There are various ways in which Canonical (the company that makes
Ubuntu) makes money:
Providing their Desktop for free is likely part of their strategy to
drive user adoption of their services (and it has been quite successful,
as Ubuntu is probably the most widely use Linux distro on both desktop
Plus they probably have partnerships with other companies to provide
other specific services. I don't know much about their entire business
strategy, but those are some of the easy finds.
As for "Linux" in general, it depends... Plenty of Linux development is
done for free out of love, but a lot of it is done by big companies that
need the improvements for their own enterprise needs.
Ubuntu MATE specifically is funded by donations. These donations really
mostly cover the cost of hosting this website and other infrastructure
things, as I understand it (I actually don't know, I'm just piecing this
together from what I've read around). Some of those donations are used
to pay developers to create features or fix specific bugs. But 99% of
Ubuntu MATE is really done for free and out of love.