Before, you had told Terraform, "I want an instance to exist, and its user data field should contain 'foo'". Now you're telling Terraform, "I want an instance to exist, and its user data field should contain 'bar'". Terraform says, "I can't change the user data after the instance has been created, so I need to destroy and recreate it".
"terraform plan" should tell you what's actually changed, and if you pick its output apart in a text editor, you can set it back.
The best thing to do long-term is to set up your provisioners so that, after Terraform runs to completion, the system is fully functional. Then you (mostly, usually) don't care whether Terraform wants to destroy and recreate things.
But this is something Terraform likes to do from time to time and it's good to plan for it.