<p>I have a personal wiki that I take notes on.  The wiki's pages are in a subversion working copy directory, "pages", and I set their permissions to 664, owned by www-data:www-data.  My username is in the "www-data" group, so I can checkin and mess with the pages manually.</p>

<p>For a while, I had an issue because every time I ran a checkin, the files would be owned by me:www-data instead of www-data:www-data, and I would no longer be able to change the wiki files through my web interface!  I solved the issue by flipping the setgid bit on the "pages" directory, but I'm still confused as to why this happened in the first place:</p>

<p>Every time I check something into subversion, it appears as if svn deletes it and recreates it.  Why?  Does this behavior support some functionality that I'm not aware of?  Is there a way to change it?</p>

<p>Thanks!</p>

I think you are using it wrong. What you could do is still have everything in subversion and have your local working copy separate from the www directory which you develop on.
Then just have the www working-copy auto-updated (or exported if you don't want the .svn directories in the www foldeR) for the www-user by some script (perhaps as a
post-commit
hook) which then setups permissions accordingly.
Work flow would be:
edit files in /home/youruser/yourwiki-working-copy/
do svn commit
post-commit hook updates the files in /var/www/ (or wherever the wiki is located)
goto 1.
This way, you don't have to worry about permissions and you can even have more than one person work on the web site with all the benefits of version control.