The most obvious difference between a shaken and a stirred drink is that one is cloudy and one is clear. That cloudiness is air, and it does several things beyond changing the appearance.
Where the cloudiness comes from
Two sources.
Tiny air bubbles introduced by the violence of shaking, suspended throughout the liquid.
And microscopic ice fragments broken off the cubes, which are why double straining reduces cloudiness without eliminating it.
Both settle over a few minutes, which is why a shaken drink is at its cloudiest immediately after pouring and clears slightly as it stands.
What it does to texture
Air makes a drink feel lighter and softer in the mouth.
A stirred manhattan feels dense and viscous. The same components shaken would feel lighter and more diffuse, which is precisely why spirit-forward drinks are stirred.
In a sour, that lightness is desirable. The drink is meant to be refreshing rather than weighty, and the slight foam gives it a pleasant lift.
What it does to aroma
Aeration releases volatile compounds, since bubbles carry them to the surface where they escape into the headspace above the drink.
That produces a more immediately aromatic drink, which is why a freshly shaken sour smells vivid.
The trade is that those compounds are being released faster, so a shaken drink is at its most aromatic immediately and declines over the following minutes.
A stirred drink holds its aromatics longer, releasing them gradually.
Foam
Where there is protein or a saponin present, the air becomes structural rather than merely suspended.
Egg white and aquafaba both stabilise bubbles into a lasting foam, which sits on the surface and delivers aroma throughout the drink.
Pineapple juice foams naturally because of compounds it contains.
Citrus juice produces a light temporary foam that fades within a minute.
Oxidation
The one genuine drawback, and it is small.
Introducing air means introducing oxygen, which begins reacting with the drink immediately.
Over the ten to twenty minutes a drink takes to finish, the effect is negligible. It is why batched cocktails are not shaken in advance, and it is not a reason to avoid shaking anything you are drinking now.
Controlling it
Shaking harder aerates more. Shaking longer aerates more and dilutes more.
A dry shake without ice aerates without chilling, which is why it builds the best foam.
Rolling aerates far less than shaking, which is why it suits tomato juice.
Throwing sits between the two, aerating gently through a long pour.
Stirring aerates almost not at all.
Those five techniques form a spectrum, and choosing among them is choosing how much air you want.
Why it matters for the drink
The same ingredients handled differently produce genuinely different drinks.
A Tom Collins and a gin fizz contain gin, lemon, sugar and soda. One is built long over ice and one is shaken hard and served short, and they are not the same drink.
That is the clearest demonstration that technique is an ingredient rather than a procedure, and aeration is the largest part of what separates them.
Trying it
Make the same sour twice, once shaken hard and once shaken gently, and compare.
The difference in texture, appearance and aroma is larger than most people expect from a change in vigour alone.
Aeration outside cocktails
The same principle appears elsewhere in drinks.
Swirling a wine glass aerates the wine, releasing volatiles into the headspace, which is the entire purpose of the gesture.
Decanting a young red does the same thing more slowly and more thoroughly.
Pouring a beer with vigour raises a head, which traps aromatics and releases them gradually. The mechanisms are related, and noticing that makes each of them easier to remember.
Bubble size
Finer bubbles produce a smoother texture and a more stable foam than large ones.
Harder shaking and colder liquid both tend to produce finer bubbles, which is part of why a well shaken drink feels different from an inadequately shaken one beyond the question of temperature.
It is also why a dry shake, done at a warmer temperature with no ice interfering, builds a denser foam than shaking with ice does.