The president ceded the floor to Elon Musk, then admitted some of his cabinet secretaries are hostile to the billionaire entrepreneur’s cost-cutting rampage.