At first glance, the forays Apple Inc., Google and other technology giants are making into the world of cars don’t appear to be particularly lucrative.

Building automobiles requires factories, equipment and an army of people to design and assemble large hunks of steel, plastic and glass. That all but guarantees slimmer profits. The world’s top 10 carmakers had an operating margin of just 5.2% in 2020, a fraction of the 34% enjoyed by the tech industry’s leaders, data compiled by Bloomberg show.

But for Apple and other behemoths that are diving into self-driving tech or have grand plans for their own cars, that push isn’t just about breaking into a new market — it’s about defending valuable turf.