Nature has programmed instincts into all creatures. This does not mean to say that all individuals of a given species will behave identically; but rather that all individuals of a species have those instincts, and there is no way around that. Sometimes certain individuals behave differently with respect to predatory or aggressive instincts. These differences may be brought about by environment issues--this is where we come to the shoaling fish that must be kept in groups, or the slow sedate fish that must be kept in quiet tanks, or the active fish that must have sufficient space to be active--all these things if denied a fish may trigger their natural instincts. Even quiet peaceful tetras like neons can, when placed in the wrong environment, become miserable terrors.
Part of the key to success with an aquarium is ensuring the fish in it are compatible, and this goes way beyond obvious behaviours. Water parameters, tank size, number of fish, and the physical environment like plants, rocks, wood, sand, whatever--all these are involved. Then knowing what a certain species is generally like should be taken as a strong guide as to whether or not that fish belongs in the aquarium.