Squids intends to kill their selfs by putting themselves on land. Like if two squids are together, one of them will push the other one on land causing that one to die in land.
Sometimes, well, most of the time, squid will swim on land making them kill themeselves.
I feel like this been a bug for a long time in Minecraft.
Duplicate of MC-132473