There have been many studies about what’s called “wake turbulence” (the wingtip vortices from a heavier aircraft causing problems with lift/attitude with aircraft behind them), but it still seems more like a dark art than a science.
Controllers have a variety of rules they must follow to try to avoid wake turbulence, from extra mileage spacing behind larger/heavier aircraft (especially on the landing approach path) to a mandated number of minutes before a smaller aircraft can take off behind a heavier aircraft. If those rules avoided all wake turbulence encounters, things like what have been described here would never happen.
Yet they do, obviously. The mandated separation rules aren’t always enough to prevent all the rolling/dropping encounters.