If everything in politics is personal trade-ins than Trump drummed up the annexation talk leading into the Israeli election(s) in exchange for a peace deal to use in the US election.
In any case Trump deserves a HUGE amount of credit for creating a bargaining chip and than using it to get a deal.