I don't understand why Russia exports large numbers modern fighters to other nations but builds almost none for itself. Take for example the SU-30 with over 300 exported to other nations like China, India, and Venezuela but Russia only has 9 for training and Russia still relies mostly on 20 year old SU-27s. Its the same sad story with the PAK-FA when Russia builds large numbers for export allies but builds none for itself. Russia is also more likely to export the new SU-35BM to other countries but will not buy the SU-35BM for itself. The same with the T-90S tank. Do you know why Russia does this? It makes no sense at all to me.
Obvious. Look at what's happened since 1991.
When the USSR fell apart, there was a general economic collapse in the successor states, including Russia.
At the same time, the proportion of GDP spent on the military was slashed. Total military spending in Russia fell to maybe 10% of the Soviet level, 15% at most.
Russia inherited the bulk of the USSRs armed forces, & for political reasons, the armed forces were not cut in size to match their shrunken budgets. Therefore, most of the budget went on operating costs. New equipment purchases dropped to almost nothing. Even so, there wasn't enough money to operate all existing equipment, so much was stored, unused, including many new or nearly new aircraft, tanks, etc., & a lot of what was notionally in service was very lightly used.
Eventually, the armed forces were cut down to a more manageable size, & spending began to increase. But they're still under-resourced in proportion to their size, & they still have large stocks of high-performance, lightly-used equipment. It would be insane to buy new aircraft (or tanks, or whatever) in large numbers, when they still have more perfectly good old - but hardly used - aircraft than they can operate. Better - and much, much, cheaper - to modernise as much of what they already have as they can afford to operate, & invest in R&D to keep up to date, to be able to build new types when needed. In the meantime, keeping the factories afloat with exports is rational, to maintain capacity for when it's needed by Russia.
If you have a garage with two cars in it, a bit old but hardly used, still almost as new, why buy a new one? Use your current one until it wears out, then get one out of the garage.
BTW, Russia isn't building any PAK-FAs for export - yet. You're talking of future projects as if they're accomplished facts. Also, I suspect you're overestimating Russias wealth. Even with the growth of the last decade, Russias total GDP is now in the same league as the UK, less than Germany.