The EU is far from "perfectly functioning". It functions pretty well but it's not perfect. There's some non-negligible group in pretty much every country that rightfully has some major gripe with the EU. If there wasn't we wouldn't have things like Brexit. I get that you can't please everyone but if the UK GTFOing isn't indicative of some sort of imperfection than I don't know what is.