One obvious reason would be to keep them from slipping further into Moscow's (renewed) sphere of influence. Of course you won't find that spelled out so obviously in official EU documents...
But consider that they even included Belarus in the Eastern Partnership:
The inclusion of Belarus prompts the question whether values or geopolitics are paramount in the initiative. EU diplomats agree that the country's authoritarian president, Alexander Lukashenko, has done little to merit involvement in the policy at this stage. But the EU fears Russia will strengthen its grip on Minsk if it is left out. It is, however, assumed that in the long-term, Lukashenko will become less important with time.
Russia has expressed strong concerns over the Eastern Partnership, seeing it as an attempt to expand the European Union's “sphere of influence”. [...] Sweden, the co-author of the Eastern Partnership project together with Poland, rejected Mr Lavrov's position as "completely unacceptable".
Also, the EU countries aren't really united on their vision further east:
Germany, France, and others were not happy with the possibility that the Eastern Partnership could be seen as a stepping stone to membership (especially for Ukraine), while Poland and other Eastern states have explicitly welcomed this effect.
Among these Eastern Partnership countries Moldova (and Ukraine) have an Association Agreement, which is an even closer form of cooperation with the EU. For the former
The agreement commits Moldova to economic, judicial and financial reforms to converge its policies and legislation to those of the European Union.
On 1 July 2016, the Association Agreement (AA) between the European Union and the Republic of Moldova fully came into force, following ratification by all 31 signatories.
(31 because EURATOM is a separate signatory.)
And of course mirroring to some extent developments in Ukraine:
Igor Dodon, who was elected President of Moldova in November 2016, campaigned on holding a referendum on cancelling the agreement in favour of joining the [Russia-led] Eurasian Economic Union.
This Agreement includes a Deep and Comprehensive Free Trade Area, which might benefit EU (producers) as well. E.g.
Most recently, the EU has concluded association agreements that incorporate ‘Deep and Comprehensive Free Trade Agreements’ (DCFTAs) with three of the six ‘Eastern partners’ of the EU – Georgia, Moldova and Ukraine. Ukraine’s was the first and is the most advanced, offering an “unprecedented level of integration”, according to the European Commission. These countries are not members of the single market or customs union, but are still granted deep and comprehensive market access and customs co-operation – though only in return for aligning their domestic laws to EU law. Ukraine, for example, will have to implement 80 to 90 per cent of the acquis communautaire (the body of EU law and regulations). The agreements provide an incentive structure for domestic reforms within a binding legal framework. They form a key part of the EU’s neighbourhood policy, enabling it to spread its values and regulatory influence. [...]
The association agreements have also attracted interest because of their ambitious services provisions. [...] The Ukraine deal goes beyond the Moldova and Georgia agreements, in theory offering “internal market treatment” on important services like finance, transport, and postal and electronic communications, once regulation is aligned in these areas. [...]
The association countries can participate in numerous EU agencies in a range of policy areas, sometimes on equal terms to member-states. All three Eastern Partnership countries have full access to Horizon 2020, a major EU research programme, and Euratom, the EU’s nuclear regulator. Again, participation is contingent upon alignment with EU law in these areas.
Of course, all the privileges come at a high price for sovereignty. The three countries only have improved access to those sectors where their laws are aligned (‘approximated’) to European ones. If a dispute arises relating to regulatory approximation or to an interpretation of EU law, the arbitration panel that oversees the agreement must request a ruling from the European Court of Justice, whose verdicts are legally binding (known as a ‘preliminary reference’). Other than on such issues, the arbitrators oversee the agreement without any ECJ involvement. [...]
The three association countries are of strategic importance for the EU, located along the fault line of east and west. The EU views the Ukraine association agreement as a tool for encouraging the country to respect Western liberal values, and to lure it away from corruption and Russian autocracy. It is also a way for the EU to take accession off the table by offering association in place of membership.
Although I haven't seen explicit comparisons, the proposed Institutional Framework Agreement with Switzerland seems fairly similar, e.g. it has a similar provision on ECJ's role in disputes. So clearly these measures (towards Eastern countries) are more than just PR, they serve some EU market interests as well.
The EU in general has been reluctant to be seen as permanently closing the door to further (full membership) accessions, even if it currently agrees that future accessions are unlikely in the near term. See their decades long talks with Turkey.