According to the FHS:
Programs must not assume that any files or directories in /tmp are preserved between invocations of the program.
Rationale
IEEE standard P1003.2 (POSIX, part 2) makes requirements that are similar to the above section.
Although data stored in /tmp may be deleted in a site-specific manner, it is recommended that files and directories located in /tmp be deleted whenever the system is booted.
FHS added this recommendation on the basis of historical precedent and common practice, but did not make it a requirement because system administration is not within the scope of this standard.
However, this is only a recommendation, and furthermore, it states only between invocations of a program -- which unless you're rebooting your server as well at 5am on Sunday, isn't happening. So, things like lockfiles, temp sockets, etc get deleted and cause problems.
As MadHatter suggested, use tmpwatch
.