The EU does contribute to free software to some extent. But not enough.
At least 7% of Linux contributors are in Germany+France.
That's not the EU contributing, that's individual germans and french, on their own time or if lucky while employed by private companies. Not the EU [government].