You can’t just snap your fingers and solve the problem of systemic racism that was created over centuries. It is going to take a lot of work.
Two reasons: One, they just aren't applying for positions
Two: There are two ways to become a pilot in the airlines today: Have enough money/loans to get a 150K flight training so that you can get your ATP, or join military as a pilot and have them train you, and when you obligations are up, join an airline.
Just like any STEM major or profession, it takes effort in order to make it in those areas. My son's HS class had a large percentage of students who were going to college for engineering.. same with my daughter for nursing... only a small percentage of those who started, finished in their major for probably a number of reasons.. It wasn't like they did not have an opportunity to get the degree, they did.. Either it was "too hard", decided that it wasn't what they expected, or they did not want to spend the time and effort needed to complete the program. This is no different than medical school, professional sports, special forces etc.