The wiki article seems to list three possible causes for the attack:
Travis was on medication for Lyme disease and was also given tea laced with Xanax before the attack. (Apparently the Xanax was prescribed by a Vet... though no source is listed for that exact claim, it showed up in the autopsy and may have been administered regularly?)
The woman who was attacked had a different haircut and car than Travis last saw her with, and this may have confused/enraged Travis.
A Tickle Me Elmo toy (Travis' favorite toy) being presented by the victim sent Travis into a rage.
...
In conclusion, chimpanzees should never be pets, and you especially should not give them benzos.
My takeaway was that having a chimpanzee as a pet is fine and so is giving them benzos but what you should really avoid doing is giving them a Tickle Me Elmo doll.
Afaik they have a history of sudden violent behavior so I wouldn't try it. There's calmer apes to choose from, though I would argue holding apes as pets is in most cases kinda fucked up anyway unless you are some sort of sanctuary that's taking care of orphaned ones that wouldn't survive in the wild.