I'm sure they would rather keep players but they recruit players like Haaland and Sancho with the promise of "we'll sell you on in a couple of years when you out grow us". Both those players, and Bellingham, didn't sign for them because they dreamt of playing for Dortmund. They're a stepping stone that get regular CL football and allow ambitious players to do a couple of years and move on.
Do you really think there's a scenario where they actually get Haaland or Sancho without that promise and do you actually think they believe they can keep the pair for 10 years?
They don't have to promise that, it's just the reality of the football world. Apart from Haaland that is, who did get that promise in writing via his buyout clause.
I think you're letting biases cloud your judgement because you're only seeing the players who ultimately did turn into players that bigger clubs covet. Young players still need to actually break through and reach that level, which is far from guaranteed. When you look at who Dortmund signed in recent years, there are a number of players who cost more and were older than the teenage stars. Players like Witsel, Delaney, Hazard, Can, Meunier, Schulz, Brandt, Philipp, Schurrle, Yarmonlenko, Götze, Alcacer, Immobile, Mkhitaryan etc were all bought above 20m (apart from Meunier) and in their mid 20s. These players were clearly not bought with the ultimate aim of cashing in on them and making as much money as possible. If anything players like that were supposed to be the spine of the team, and many of them old enough that you'd expect Dortmund to be the club they spend their peak years at. People look at Dortmund starting all these 18 year olds and think they're just putting them in the shop window playing attacking football at the expense of success, when it's obvious it's the failure of the established players to carry the team that puts them in their current situation.
The reality is Dortmund can't afford to buy established players of that quality so they go for promising young players and hope they choose to stay long enough to benefit from having players of that quality. However those young players aren't supposed to carry the team like they almost have to now. They should supplement a functional team. That has also been their transfer strategy if you actually look at who they signed, it's just not working out right now.
I doubt any young player in Sancho's situation at City is going to look at Sancho now and think "no way am I going to Dortmund, they won't let him leave!", isn't that putting the cart before the horse? Haaland's transfer isn't really comparable because he was scoring for fun in Salzburg and the CL. Young players will look at teams where they can develop into good players, and not take it for granted that they will.