Why didn't Locke want anyone to leave?

I just remembered that Locke sabotaged Sayid's transceiver and blew up Jack's sub. I understand that he didn't want to leave but why did he stop others from leaving. It doesn't really make sense. Was he afraid that if anyone left they would bring outsiders to the island? Was he afraid of being alone in case everyone left? Can someone please tell me why he did what he did or am i just suppose to assume that he was crazy(as was believed by everyone on the island).

Also on Fandom

Random Wiki