For the same reason that China stopped buying Flankers from Russia, and started building its own airframes, engines and avionics.
China got license to built Su-27SK, which is basically an early 1980s technology.
in the 1990s Su-27M was the most advanced Flanker, India got the Su-30MKI which was more advanced that the version China got.
Why China bought Su-35?
easy very easy, because Russia advanced too, by 2000, Russia had engines like Al-31FM2 and Al-31FM3, later Russia developed the 117S which left obsolete the engine technology of both Su-27SK and Su-30MKI behind.
In 2017 Russia already has T-30, and very likely Salyut has developed a new variant of engine of Al-31.
This is just engines.
In Radar technology, Su-35 can develop a 400km range because its engine can save the number of bateries, and generate the electricity to boost the range.
Su-35 has also RCS reductions, based upon new materials, it has new airframe architecture, what does it mean? well it allows for 2 tonnes of more fuel internally.
Why China bought Su-35?
Answer making stealth airframes does not make an aircraft stealthy, but a combination of technologies among them electronic warfare and a lot of the engine technology makes an aircraft a 5th generation.
Why? supercruise is a factor some reports say Su-57 supercruises at 1500 km/h, Su-35 was said to be able to supercruise.
Short take off and landing is also part of the engine.
Superior agility is part of the engine equation. as well lower drag and longer range.
The new aircraft can also carry more weapons.
can you compare Su-35 to Su-27SK?
Not really, specially Russia this time is charging 2 billion for only 24 pieces, even with inflation, the sum is too high do you remember the license coasted 2.5 billion well it seems Russia is charging what China did not pay