Elon Musk has lost his bid to block Sam Altman from transforming OpenAI into a for-profit entity.