Actually - they weren't "with" each other. They were around the same cover, but occupying different depths. This is quite common ... and sometimes (as you noted) only a few feet separate the two schools. The competition level, between year classes, favors the smaller fish - they've usually got the numbers. Food, cover, and space are the prize. But, the larger fish are "survivors", and more wary than the younger ones. They go where they want ... even if that place is already occupied (except if occupied by larger predators). They utilize the larger, deeper running baitfish ... as well as the "stunned" ones that the smaller fish don't dive after.
I always tell people - if you're catching small fish ... fish deeper or move to another location. It's rare that different sizes (year classes) will mix and/or collectively run together as a single school. But it is quite normal for them to be in the same area, or even on the same piece of structure, at times. I think you just happened to find them at one of those "times". Nice move ! ...........cp