For some reason, OS X has a concept of "locked file". You can lock a file (or directory) by selecting its info screen (CMD-I or File->Info) and then clicking Locked button. Locked file is hard to remove (either rm or move to trash).
To lock or unlock a file in terminal, use chflags command. To lock, use
and to unlock, use