Let's say you live in a village.
Someone comes and conquers your village and throws all of you on the streets. The conquerors say that everyone must now earn their houses anew. They also bring in some foreign workers who are racist towards you, and discriminate against you in favor of their own ethnic group.
When the conquerors finally leave, you find that the foreign workers now form an elite, elusive, racist class that owns the best parts of the village, and your people are reduced to living in the gutters.
What do you do?
Ultimately, Malaysians of all ethnicities will have to drop their racism and work towards an inclusive society, but the continuing inequities of the colonial era will remain a stumbling block for some time to come.
Actually, the policy is more like the affirmative action policies in the US, Canada and Australia, which favor the Native Americans and Aborigines, in recognition of their losses by colonialism.
The only difference is that, in Malaysia, the natives got their land back, but the inequities of the colonial era remain and still need to be redressed.
The colonialism history of both Malaysia and Indonesia does not simply follow your analogy of native villagers being discriminated economically in favor of foreigners. That story of course are more easily built to incite nationalism and That is the story the Malay nationalist wants to portray, but it is far from that.
At least in Indonesia, there were a lot of elite natives who collaborated with the Dutch and gain prominence economically and socially. Even now, their descendants still holds economic and political power in the modern nation.
The problem is that it is easier to draw line between "we the natives" and "they the foreigner/immigrants" rather than "we the underclass" and "they the elites". And in the case of Malaysia, it is exactly that line that justify affirmative action policies. Who benefit the most? It is principallty the elite Malays who benefited the most. Affirmative action should help those in need, that is the poors and economically disadvantaged regardless of race. If it were to happen that most of the poors are Malays, then help them. If it were to happen that the minority of the poors are Chinese, then you should also help them.
The story of Indonesia is different though. The Indonesian government since 1998 reform has begun to erase the line between "pribumi" (natives) and "keturunan" (descendants of immigrants). Under 2002 citizenship law, those who were born in Indonesia and has never accepted other countries' citizenship are considered as "Native Indonesian", including the Chinese, Indian, and other foreign ethnic groups. The affirmative action instituted by Indonesian government are not race based, but purely economic-based. Example is affirmative action towards Papuans and East Indonesians, where their economies are still underdeveloped.
As consequences, In Indonesia, the story of economic struggle has shifted from "we the poor natives" and "they the wealthy chinese" to "we the underclass" and "they the rich elites". This perception is also driven by the fact that a lot of corruption scandals involves a lot of rich natives Indonesian.
Of course racism still exists in Indonesia, but it is the consensus of most Indonesian that it should not be institutionalized as in the case of Malaysia.
In Indonesia, the sacrifices has been made. Due to Suharto's policy, Chinese schools were closed, most Chinese Indonesian can't speak Chinese, and they can;t even have chinese name. As the consequences, after reformation Era abolishing those discrimination against chinese, the Chinese Indonesians has become more willing to integrate with other fellow Indonesians in contrast with their Malaysian counterpart..