Sony switched to mirrorless, because they had the good fortune of being failures in the DSLR market.
Not true. I owned the Sony a700, which was in it's day one of the best DSLRs on the market, with excellent specs and great ergonomics. It certainly wasn't a failure in terms of design or performance, having inherited Minolta DNA. I only switched to Canon myself because Sony didn't have an upgrade path at the time (they later introduced the a99, a7 etc).
The truth is that Sony at the time were new to the DSLR market, in which Canon and Nikon were very much dominant, and rather than compete against them in their own field, they decided to develop an entirely new line of mirrorless products (the a7 line) which were in many ways hugely superior to DSLRs. Without a kick up the butt from Sony, there would be no R5, no Z9 - without a kick up the butt from Sony, we'd probably all still be using DSLRs.
Canon and Nikon were caught with their pants down, and it took them years to catch up, and to arguably surpass Sony. I say all this as a neutral observer, having owned extensive systems by Nikon, Sony and Canon. (I've used Canon for 12 years now and currently own a R5 and 7 RF lenses, as well as a 5DMkiv).