A lot of fish in the wild might take advantage of cover sometimes-- weeds and plants, overhanging branches, fallen logs, behind a big rock, etc., Might be for shade from strong sunlight, as a quiet spot out of a river's main current, to conceal themselves to stalk prey, or because it's where the little critters or small fish are that they feed on, etc. That's different from a species that would normally stay in a small enclosed space and doesn't mean you need to provide them caves.
In a tank, most species simply adapt to the circumstances in the tank. For example, if you feed floating foods, a lot of species that wouldn't normally feed at the surface just adapt to it. So, provide lots of cover and your fish might use it, keep an open tank and the same fish would be just as comfortable, maybe more so if they prefer open water to too much structure.
You'll also get fish that when you come into a room will duck for cover (if it's there) while others will come right out to the front of the tank. Different species-- or individuals-- can have their tendencies that way, but some of it just depends on how comfortable they are in the tank or how tame to you they've become.
Actually, in a large enough tank, with different zones and a community of species, it can be interesting how different species might tend to like (or claim) different zones in the tank.