Condition 3 in the SE Terms of Service says that
You agree that all Subscriber Content that You contribute to the
Network is perpetually and irrevocably licensed to Stack Exchange
under the Creative Commons Attribution Share Alike license. You grant
Stack Exchange the perpetual and irrevocable right and license to use,
copy, cache, publish, display, distribute, modify, create derivative
works and store such Subscriber Content and, except as otherwise set
forth herein, to allow others to do so in any medium now known or
hereinafter developed (“Content License”) in order to provide the
Services, even if such Subscriber Content has been contributed and
subsequently removed by You.
Your use of SE is predicated on agreeing to those various terms, and therefore they can prevent you from deleting your content. They can of course decide to allow you to delete content, but legally need not.