I'm trying to think this through, and have a few different (and underdeveloped) crackpot theories rolling around now.
In Tests, I'm not sure there's a real shift. In most teams around the world, the spinner (or spinners) who are playing regularly are the best available -- on balance, most of them are finger spinners.
I'd say a some of that comes down to:
- It being really hard to bowl flighted, aggressive, long-format leg spin
- It being really hard to bowl flighted, aggressive, long-format leg spin without going for ~4rpo. On first glance, the only one with an ER closer to 3 than 4 seems to be Yasir.
- Most teams having fairly well-developed, successful andgood pace attacks that form the core of the wicket taking strategy
- Modern quicks being made of glass, so having a spinner who can shift into bowling bulk overs economically at a moment's notice gains a stack of value -- which is far easier for an offie/SLA
- Most Test match spin bowling relying on beating batsmen in the air and threatening both edges (and the pad) ball after ball, with pressure applied by close-in fieldsmen.
- No real need to turn the ball both ways
- Alternatively, beating batsmen with bounce
- The ball having time to get old, and pitches having time to deteriorate.
Meanwhile in ODIs/T20s, I think some of the factors are:
- The wicket-taking ball being one that generates a miscue to deep midwicket -- this suits leg spinners who have quick arm actions that hide variations, and less accurate big turners
- Finger spinners usually not having one that goes the other way, making it a bit easier to swing through the line -- it'll turn a couple of inches or it'll hold its line, it won't turn a couple of inches the other way
- A near-obsession with always turning the ball away from the bat, to make it harder to swing through the line
- The ball never getting old and pitches never deteriorating, making it less likely turn in the first place (and being harder to actually rip out of the fingers)
- It being a bit less hard to bowl flat, defensive, short format leg spin
- Classical finger spinners seeming to find it a bit harder to adapt when batsmen are coming at them really hard and there's less field-related pressure
- Leg spinners with quick arm actions being hard to pick up, increasing the chance of a miscue when the batsman is trying to force the pace (whereas in long-form cricket they can more easily sit and wait for the bad one)
- The Test match spinner often being rested
But yeah, some of these are probably wrong, or are not at all helpful in actually explaining it.