“Was” being the operative word here. SpaceX is now supplying a valuable service to all comers for less than any of the other commercial launch suppliers in the world. “Was” it a vanity project to begin with? Possibly (probably.) However it has evolved to be more than that.