Does segregation make economic sense?
In many models, we assume that firms simply want to maximize profits, and there are no externalities. If these assumptions are true, then a free market will be racism-free, gender-blind etc, etc. However, this is not the case in the real world. People that own and operate firms not only want to maximize profits, often they also have all kinds of biases, including social biases like racism, sexism, etc; as well as cognitive biases, for example when they want to make the firm as big as possible even if that is not profitable. In all cases, this biases necessarily mean forgoing profits. For example the paper you cite. Ross Levine has other papers on the topic.

However, the question of segregation is broader than this. For some type of relationships, "segregation" can make economic sense. For example, if you have a common resource, like a lake that provides some fishes, limiting who has access to such lake to only people who take care of the lake and does not overfish it, can have clear advantages, and be socially efficient. 

In short, segregation can be the result of a friction, like cognitive or social biases. This is not a market failure, properly speaking, but it entails some inefficiencies, so in that sense, it does not make "economic sense". But you can also have segregation, being the optimal response to a situation that involves externalities (like in the example of the lake). This segregation can make "economic sense" in that it is individually rational, and it may or may not be socially efficient. 

Consider an example where it is likely not socially efficient. Suppose there is a big proportion of people who are racist, and you own a restaurant. Let's assume you are not racist and you only care about maximizing profits. It is perfectly reasonable to think that you will deny service to people based on race if that will make your racist costumers more likely to visit your restaurant. This segregation makes "economic sense" even though it might not be socially efficient in some way or desirable (the social welfare can be measured in many ways). Notice that I needed to assume that your other customers somehow have negative externalities from you selling to racial minorities.