If Apple knew they would never ship a car, they wouldn't have invested. At some point they must have projected a profitable business case.
OTOH Mac Pro likely sold in such low numbers, that unit profit never pays back the R&D. IOW no projected profitably business case.