A statement released by the EU says that “taxpayers’ money needs to be protected against those who undermine the EU’s values.” The sanctions serve to enforce a 2021 resolution declaring abortion a "human right" and criticizing pro-life laws as "a form of gender-based violence."
The BBC estimated on March 21st that 2,113,554 Ukrainian refugees had fled to Poland, while 317,863 had gone to Hungary. Those numbers will almost certainly increase as fighting continues, but the European Union still thought it important enough to level sanctions against pro-life nations as they were sanctioning Russia.