The concept of shoaling fish is important to understand. A major aspect is undoubtedly security. We can see parallels through out the animal world. Grazing animals in Africa live in very large herds, and this makes it more difficult for predators (lions for example) to hunt them down. The lions try to isolate one animal, and target in; that animal will likely succumb, but the others are protected by the numbers in the herd. If the grazing animals were to split off and each be on its own, it would be easy pickings for the lions, one by one. The herding instinct is programmed into the animal's DNA, so they "expect" to live in large herds. Shoaling fish species are no different.
Corydoras are good examples. These fish live in groups of hundreds, and while they do spread out they remain in relatively close communication, visually and chemically. Their first instinct when they feel threatened is to freeze. When you see this in their habitats, it is very difficult to see the fish against the background of the substrate beneath them. If this strategy fails, they obviously have a very well tuned communication system, because they will instinctively all charge off as an entity in one direction. This serves to confuse the predator.
This need for a group or shoal is what Paul Loiselle termed an expectation of the individual fish. Denied that expectation, the fish will feel threatened, and that causes stress. Stress if not somehow abated becomes acute, and then the fish's immune system is severely weakened making them more susceptible to disease, and various other physiological problems occur. Stress is the direct cause of roughly 95% of all disease in aquarium fish; avoiding stress clearly means healthier fish. Loiselle says the denial of an expectation is inhumane treatment of the fish, and we are naive if we expect this is not going to seriously impact the fish's well being.