this phrase can be applied to many circumstances. For example, laws drawn by politicians with good intentions (or not) attempting to solve one social problem only to create havoc of untold proportion in another area or to another group.
We find ourselves innocent of the intention to do harm and still have unintended consequences. Over 20 years ago Camillo designed and built our house near Nova Friburgo in a Swiss/Italian style. He designed in a large window that was to bring in sunlight, sky and create some heat inside the house. It lights the loft area during the day and brings us immeasurable pleasure when the moon rises above the house, and when the clouds turn pink or yellow with the sunset.
Now that we live up here year round we have found that while we enjoy the light and the view, small birds see our reflected view as part of their domain and when doing their evening insect hunts, crash into the window going supersonic speeds. Generally they fall to the veranda, sit in stunned silence for 30 - 45 minutes, shake their heads in confusion, then fly off with a huge headache (I am sure) to find their families. And occasionally, usually the hummingbirds, don't make it - we have to scoop them up with deep regret.
We've thought about it but can find no solutions to this problem (aside from removing the window and putting in wood which would be costly and possibly ruin the structural integrity of the house), we have to just live with the unintended consequences of the damage we do to our bird-friends from the local forest.