Kamala Harris and Justice Brown-Jackson are married to white men for the same reason that white women are married to white men. They were educated in places (at least at law school, for Harris) where white people were prevalent. You marry the people who are physically close and available. Black women and white men are now more available to one another in social and educational places and more white men are willing to "buck the system" and marry the women they admire. Of course, in many intellectual circles, the couple won't be shunned as they would be in less elevated spaces.
Re "winning the lottery." Because this country is still so concerned with "race," marrying a white man will almost always be considered marrying "up." I have been married to my white husband for nearly 40 years. Does it make it easier for me socially in many spaces? Yep. It sure does. Of course, he won "the beautiful wife lottery," so let's call it even.