No it doesn't work like that. When you want to join EU, you first become a candidate country and you start receiving EU money to fix your institutions and infrastructure and you keep getting more and more as you integrate and then you become EU country when you are ready. Turkey for example, a candidate country, received quite a bit of EU money until most of the funds got cut once the country drifted away politically. Yet, the EU funds and the institutional changes done to get these fund helped a lot and the country got in much better place during the decade they were getting ready to join EU.
Why EU is doing this? Well because, its much better to have prosperous and stable neighbours even if they don't end up join. Because of this, despite the politics Turkey and EU have very strong trade and security relations.
The same goes for every country, eastern European countries were a shit hole for quite a long time after the collapse of the USSR and they transformed to be good enough to join EU and they did use EU resources when transforming.