WordPress has a constant called EMPTY_TRASH_DAYS that it automatically sets to 30. What that means is that WordPress will automatically delete all posts, pages, custom post types, etc, that have been in the trash for 30 or more days.
// wp-includes/default-constants.php
function wp_functionality_constants( ) {
// more stuff