I’m not sure I follow. These countries get back multiples of their membership fees, largely in infrastructure funds (i.e. there is no repayment). You can literally not take that money if you so wish.
In return you have to sacrifice a lot. Just to make an example we have to order stuff from EU countries (like buses and trains) instead of buying form our own companies because it is against "regulations". It is just an extortion racket behind the scenes.
You have to run transparent bids for public works, yes, and buy stuff that is guaranteed not to kill your own citizens.
This is actually a great way to root out local corruption and to force companies to innovate, rather than lazily relying on guaranteed local contracts. It also enables them to compete over the entire EU market, on a level playing field. And it's doing wonders for your economies, which have grown quickly and consistently.