"Terraform plan -destroy" is failing when it observes prevent_destroy flag in config files

Hi, “Terraform plan -destroy” is failing when it observes the prevent_destroy flag in config files. Not sure why is it forcing us to use the -target flag
Error message: lifecycle.prevent_destroy set, but the plan calls for this resource to be destroyed. To avoid this error a
│ the plan, either disable lifecycle.prevent_destroy or reduce the scope of the plan using the -target flag.

What I am expecting:
When we plan to destroy or if we execute destroy command, terraform should delete the resources which don’t have the prevent_destroy flag. And it shouldn’t touch the resources with the prevent_destroy flag. But here in my case, it’s failing at the planning stage.

Not sure if this is how the destruction should work? Can anyone give me some clarity on this behaviour of terraform

If you are running the destroy plan you are telling Terraform to destroy everything. It sees that includes some resources with the delete prevention enabled, so it fails.

If you are wanting to destroy the items not marked with delete prevention you will need to use -target to manually specify exactly which resources to delete.