Yes, there's luck involved in when vacancies come up, obviously. The drivers at Red Bull seem to be kept on as long as they're performing to an acceptable level, whereas the Torro Rosso drivers seem to be viewed as having gone past their sell-by date after three seasons even if they're performing well and have only failed to get promoted because no vacancies came up (e.g. Alguasuari and Buemi) or because they were overlooked for promotion in a rather marginal decision (Vergne). The alternatives are either to have drivers hanging on at Torro Rosso for four or five years or more, creating a log jam in the driver development programme behind them, or to regularly sack whichever Red Bull driver gets beaten by his teammate to create regular vacancies there.
They don't do either, so we're bound to see very talented and perfectly competent and experienced F1 drivers leading Torro Rosso in the prime of their careers. If the drivers Red Bull abandons are as good as people think, presumably they'd be picked up by Ferrari or Mclaren (either directly or placed with a midfield or backmarker outfit for assessment), but that doesn't happen so the other big teams seem to be happy to let them drift away.
In this particular case, since we've had two vacancies in two years at Red Bull, in theory Vergne should have been saved from the scrapheap and Kvyat should have stayed put. Even if Marko and Newey feel Kvyat has more potential, I can't see what harm it would have done to keep him where he is for at least one more year, meanwhile giving Vergne the chance to prove them wrong by beating Ricciardo at Red Bull. They haven't done that, so it looks like he's on his way out of F1, which is a shame.