Korean and Ainu have nothing to do with the base of this issue.
Historically Buraku means a kind of slum, outcast communities of the feudal era in Japan. People were not allowed to change occupations. If you are born in
Samurai family, you will be a Samurai. If you are born in Buraku, you will never leave there and be a Samurai. You must be executioners, undertakers or animal slaughter... anyway considered with death or tainted (people think) things.
The reason why they were discriminated against is only this. They have been made to undertake the work people hate.
Today we can choose any occupation and live anywhere we want. Buraku disappeared
for a system. However, it's true that it remains a meaning.
The economical problem was a main thing. Japanese government expended
15 trillion yen since 1969, for the living standards issue in Buraku.
I think that this issue changed. Buraku problem makes big money.
If so-called "Buraku discrimination" is solved, some kind of groups will loose privilege.
Zainichi-Korean problem is the same. If they live as Japanese or they live as same as other foreigners, they will loose Zainichi privilege.