I think the main reason is that Dortmund have never set themselves such a big goal as winning the Bundesliga. Maybe they have tried to do it, but Bayern’s and Dortmund’s objectives are fundamentally different. It starts with the fact that Bayern don’t sell their best players, while for Dortmund it seems that selling their best players is one of their main goals each season, as if making money is more important than winning titles.
That is certainly the case; the differences in club management between the two teams shape their current situations. As you mentioned, Dortmund and Bayern Munich fundamentally different of their squads and expectations. While one focuses on making a profit, the other is intent on achieving success. Perhaps that is why quality players from Dortmund transform into global superstars after transferring to Bayern Munich.
In other words, the difference between the two is due to finances. For Dortmund, selling players is a necessity to maintain the club's financial stability. In addition, when many clubs show interest, players often have no hesitation in moving for the sake of advancing their careers.
Meanwhile, Munich is already an almost perfect team. They have stable finances, a better club history, and the mindset to aim for championships especially in the Bundesliga and UCL. For this reason it's not difficult for them to bring in players, even if those players come from their rivals in this case Dortmund.
This is also what allows Munich to dominate the Bundesliga every season, while Dortmund can only compete but can't win the title. Maybe if both clubs had equally stable finances we’d see the Bundesliga title being won by a different club each season.