Empowered by President Trump to make government more efficient, tech entrepreneur Elon Musk has targeted entire agencies for closure, seized control of payment systems, ousted career civil servants, and pressured employees to retire early.Even as questions swirl about whether his actions are legal, Mr. Musk’s lightning strike on the federal bureaucracy raises a fiscal puzzle:…