Why does WordPress 3.0.4 keep deleting the contents of the .htaccess file?

Something else is going on here. WordPress does not erase the contents of the .htaccess file when it writes new permalinks; it appends the new permalink structure to the end of the file.

Do you have anything other code or plugins that uses .htaccess? Are you on a Windows server that does not natively support mod rewrite and as a result requires other ways of enabling mod rewrite and might be the cause of the erasing?

If you want to keep WP from writing/appending to the .htaccess file, set permalinks, make your own changes, and then set .htaccess permissions to 444, and then you can view the permalinks admin page without WP automatically appending to the file. This is what I do.