This is like every employee at a company paying into a pension fund, and the pensions only being paid out to the managers.
The Supreme Court ruled July 18 that foreigners living in Japan, even with permanent residency status, are not entitled to receive welfare benefits known as seikatsu hogo, literally livelihood protection. It is the first ruling that considers foreigners ineligible for such benefits. The ruling sends an unfortunate message to foreign workers that while their contributions to Japan’s economy might be welcome, the government, in turn, is not obliged to take care of them when they are in need.
Source: The Japan Times