Dwight has more than enough reason to want to rid the planet of Negan and his many underlings, from his face to his broken marriage to the constant belittling, and his assistance would be invaluable to the Alexandria and Hilltop residents who refuse to stay pacified.
When Dwight appears in those final moments, narrowly avoiding a Daryl-sponsored beatdown, he appears willing to align his efforts with Team Family, though he isn’t given much of a chance to prove how legitimate his newfound protagonism is.
Rick has him on his knees and in point blank range, as is Rick’s way, and it’s worth noting that more often than not, people who get this treatment end up being on the level.