Concept for "when a mechanism exists which can be exploited, people will exploit it"
I think the broad principle you are looking for is: people respond to incentives. 

This is an important principle (some would say the most important in economics), with many implications and corollaries. But I think the particular implication you're looking for is unintended consequences.

So in your example, welfare was intended to alleviate poverty. However, because people respond to incentives, welfare has the unintended consequence that some people have more children.

(Other similar terms you may be thinking of: Cobra effect, perverse incentive.)