Given that the Su-35 is merely an upgrade from the Su-27, why is Indonesia purchasing Su-35?
There can be many reasons for such a choice. The first is a single seat air-defense fighter, the other is a two-seat multirole air-superiority fighter according to Wikipedia. The cost can be another reason; depending on configuration it seems that the two aircraft have an overlap with both types starting around USD \$40 million per aircraft.
Indonesia already operate a fleet of several single-seat types, such as the Su-27, F-5 and F-16, so it might simply be easier to transition to another single seat fighter. They do have a small number of Su-30 already, so it could also be a desire to use each type for the optimal mission, rather than having one type do everything.