I'd rather blame both. The welfare system in general is more than excellent, especially compared to plenty of countries where even if you physically can't work (sick, injured, whatever), you're out of luck and will have to make do with nearly nothing. The problem with the welfare system is not 'everything', it's mostly the way how easily millions go to certain countries, often by simply spending a week or so working, and then just taking the money and taking a few months vacation until they need to come for the next week of work to finance the next few months In terms of helping out the people within who actually need it, it works fairly well. Not great, but...somewhat ok.
But I'd mostly blame the people more who shamelessly abuse it, both people within the country as well as was the case with the Bulgarian gangs (presumably some other countries too, but since it was largely Bulgarians, it's literally mentioned as 'de Bulgarenfraude', which probably doesn't need translation
That all being said, I'm still glad I'm not the one in charge of making the rules, because it is absolutely going to be impossible to find a set of rules that is actually fair for everyone and whichever set of rules one creates, people are going to say it's wrong.