He didn't knew it wouldn't be approved. The bill with removing the debt limit (the second one), as required by Trump, was submitted and rejected.
I see you also got fooled by Musk tweets claiming that the salary increase was 40%. Musk was shamelessly lying, as expected, and you believed him. 😆
https://www.factcheck.org/2024/12/congress-not-proposing-to-give-themselves-40-raise/
And here's one good reason for Musk to reject the first bill:
The spending agreement released Tuesday included a bipartisan provision to limit and screen U.S. investments in China, among dozens of other proposals attached to the 1,500-page bill.
As the CEO and largest stockholder in Tesla, Musk has extensive business connections to China. The company operates a major manufacturing plant in Shanghai and has sought to build deeper connections with Chinese companies.
https://thehill.com/business/5051709-musk-delauro-spending-bill-china/