The EU has decided that it will take economic action against entire countries that democratically elect candidates it deems to have politically oppositional stances. Why is this? And why is this viewed as a good thing from within European countries? It looks like political repression to me.
First I think you need to get your information from more unbiased sources. But apart from that what it is about is that the EU have considered various sanctions (like trade, Eurovision Song Contest or voting rights). The problem with Poland (and Hungary) is that the elected politicians are making moves towards dictatorship and that is something that worries the EU. In the case of Poland it's also about trade with Germany.
The EU does not "stop members from electing democratically representative candidates". EU members are free to vote for whoever they want. But when they vote for people who do not respect the basic values of the European Union, then there might be consequences in form of losing privileges.
The European Union is not a purely economic treaty but also a treaty of values. Article 2 of the treaty of the European Union reads:
The Union is founded on the values of respect for human dignity, freedom, democracy, equality, the rule of law and respect for human rights, including the rights of persons belonging to minorities. These values are common to the Member States in a society in which pluralism, non-discrimination, tolerance, justice, solidarity and equality between women and men prevail.
All of this is of course quite vague and open to interpretation. But when an organization has a set of political core values defined in its carta, then it is part of its very nature to "repress" any attempts to undermine these values. So when a member state does no longer respect these principles, there have to be consequences.
These consequences are further elaborated on in Article 7, which describes mechanisms by which the EU can sanction any members when the other members believe that the Article 2 values are violated by that state.
When a country is going to elect a government of people who appear to plan to violate the Article 2 values, then explaining the possible consequences to the general public in that country is completely justified.