You're ignoring a very important part, and that's contracts. They play a bigger role in these decision than actual performances. If we had signed Douglas on a loan (like Inter did with Montoya), he'd be long gone. Also, if Inter or Betis had signed Montoya permanently (like we did with Douglas), he'd probably still be there. You can't take the context away from the discussion. If the player has a several-year contract, you can't get rid of him just like that. If he's on loan, there's pretty much nothing easier than to get rid of him (which is what you would do unless you're very happy with the player). This is the reason why Montoya and Tello are switching clubs and loans. Because they're being signed on loans. Because few other clubs are as naive as FCB to buy a poor or average player (Douglas, Vidal, etc.) and give him a 5-year contract. Other clubs minimize their risks.
When you say that Montoya is not good enough to sit on the bench for Barca, that implies that Douglas is, and that's just absurd. Everyone knows that Montoya is a better RB than Douglas. It's just that Douglas is here, and he won't leave, so that's why he gets to sit on the bench. Montoya wanted to leave, he's been on two loans already, and that's a huge incentive not to keep him in the squad, especially when we already have Vidal and Douglas who are not leaving. Not because he's not good enough to be a backup.
When you say that Munir has been given an extension, you're ignoring the fact that he's literally all we've got, because we sold or loaned all our other (better) forwards, one of whom is Tello. Tello also wanted to leave, and that's why he's not here. Had he stayed, I'm pretty damn sure Munir wouldn't get a minute next to him.
And you're massively distorting Montoya's transfer history. Firstly, as far as I know, he hasn't been transferred to Valencia yet, and if he does get transferred, that's a transfer for next season. Inter and Betis were one season. Barca was the previous. That's not 4 teams in 1 year, that's 4 teams in 3 seasons.
If you want a good example of a guy who's been switching teams because he's not good enough, look no further than Aleix Vidal. The guy's changed 10 teams in 9 years, and most of those were Segunda teams. But somehow he's good enough to be a starter/backup in Barcelona?