I'm sorry, this whole thing sounds BS to me. While it makes sense to have the Authorities to look at and interview the victim^Hsoftware tester, putting a 72 hour mental health hold on someone is hard. You have to convince more than one person that you are serious. Most places don't want to hold people - it's a lot of paperwork, hassle and expense and there are enough genuine fruitcakes so as to leave few extra rooms at the inn. Even if he got tossed in on a hold, it would be reviewed after 24 hours.
Either San Mateo does really weird things or this was made up.
You are assuming that he was not complicit and wanted to be held for as long as possible. To me this whole thing sounds like a ploy for 15 minutes of infamy.