Sorry for being confusing, it's difficult to know how much experience various people have.
1. Test sites. Scheduled tasks are triggered when someone makes a request for any page in WP. On a live site, this is not a problem because live sites should have users and bots visiting all the time. On local test sites, the only user is the tester, so unless the tester views a page soon after when the task is scheduled, the scheduled task will not run.
2. Table prefixes. When you install WP and are configuring the wp-config.php file, you can specify a unique table prefix. It defaults to "wp_", but you can change it to anything, perhaps your's could be "zp_" for example. Then, to access the posts table, the table name passed to mySQL would need to be "zp_posts", not the default "wp_posts". When writing plugins, authors cannot know what prefix any particular installation is using. This is why the $wpdb object builds the correct table name and stores it as a property. When we use the property
$wpdb->posts, the correct table name is passed to mySQL, no matter what it really is, whether "zp_posts", "wp_posts", "bc_posts", using
$wpdb->posts works correctly for all of them.
3. Nav Menus. Many themes utilize the built in nav menu capability to allow WP admins to build custom navigation menus for their site. This is typically done in the Appearance>Menus admin panel. Each menu item defined here is actually stored as a post in the posts table. The content field of these special post types are empty. If your SQL query were to run on an installation using the nav menu feature, it would delete all defined menu items. To avoid doing this, you must add the above mentioned condition so that these menu items are not deleted.
Actually, you cannot know what sort of custom post types someone may use that has no content, so it's best to specify only which posts types should be deleted, instead of what should not. Of course, this only applies when sharing your plugin with others. For your own site, as long as you know you are not deleting needed information, you can do what only works for your site and not worry about others.
This all may or may not actually solve your actual problem though. Even so, I hope you are now at least a little less confused and a bit more knowledgeable :)