So we all paid for it then.
Not really - YouGov is an international Internet-based market research firm, headquartered in the UK, with operations in Europe, North America, the Middle East and Asia-Pacific. It has no known connection with the UK government despite the name.
I think it gets its funds from undertaking surveys for paying clients. I know it does surveys on shopping habits for example - presumably paid for by supermarkets or food production companies. If you really want to know I expect you could find out...

