Think about it. He is all beat up and in the first night, he just hides in Pirate Cove. When he comes out later, he hides from the other animatronics and just goes down to check on you. If you stare at him too long, he thinks you are not spending enough time checking on the others. If you do not check on him at all, then he thinks that you are dead and comes down to check on you. And I have two theories about the scream
1. He is just trying to communicate
2. He is trying to distract the other animatronics
The reason why you die and still get stuck in a suit is because his scream gives you a heart attack, good old Foxy slinks away, not wanting to get caught, an then the other animatronics come and stuff you in a suit anyway. Plus, it makes more sense that Mangle cause the bite of 87, as she hangs from the ceiling and bites people's frontal lobes off. Plus, constantly getting taken apart has probably made her angrier.
Foxy is an animatronic that was possessed by a restless spirit who was one of the children murdered by a staff member of the Fazzbear Pizza-somethingy. Because of this, the spirits happen to want to seek revenge causing the animatronics to attempt killing the night guards. Foxy is one of the murderous animatronics and he will always be one. Don't let your stupid fanfics or incomplete theories get in your head.
His voice box doesn't malfunction right as he talks to you. He doesn't hug you. He sings perfectly in the cove. This theory was made by a stupid fanboy/fangirl who hated the fact that his favorite character is a bad guy. Foxy freaking sucks!!!!!!!!!! He is the worst character from the franchise.