In general, it's OK (and sometimes beneficial) for users to delete their own posts and we have this ability, though there are some limitations to self-deletion*. The underlying reason for allowing vote-to-undelete is, as usual, that questions and their answers are not only for the OP but for the entire community of site users / visitors present and future. This means that if voters consider deleted posts valuable, they can vote to revert the OP's action.
*For example, you cannot delete your accepted answer (though voters (and of course mods) can) and you cannot delete your question if it has upvoted answers.
If you're still reading
The odd self-deletion isn't a big deal, but deleting more than five (I think) of your own posts in one day raises an automatic flag (and stops you from continuing). Deleting substantial amounts of useful content is taken seriously and could result in suspension (of course, self-deletion might be happening because the user's account was hacked, or accessed by their angry flatmate etc, so blocking rapid self-deletion protects the user too). Giving other site users the ability to undelete content helps to protect that content - which belongs to the community.
Take a look at some posts related to self-deletion on Meta Stack Exchange
Note that you always have the right to have your account disassociated from content (under the Creative Commons license used by SE). This provides a compromise between the community which benefits from useful content and may to vote to undelete it, and the author who wishes to delete content.