The EU Treaty obliges it's members to adhere to a set of democratic principles domestically (like an independent judiciary). It's the reason why the EU will likely block Turkey's entry due to Erdogan's "reforms".