And why did we put them up in the first place?
They're cool.
So the answers to both of your questions run together, basically.
It is important, first, to recognize that ‘gargoyle’ is what we might call a retroflexive term, in that people will colloquially apply it backwards from the era in which it became common parlance, to describe similar, uncategorized objects from the past.
But essentially, when we say ‘gargoyle’, we’re talking about any building facet that is spouted. This is because (to answer your first question), gargoyles serve a practical purpose in Gothic and pre-Gothic architecture, which is to convey water off of the roofs of buildings.
As noted, this wasn’t a problem unique to Gothic architecture. Almost as long as the concept of “buildings” existed, so too did the problem of captive rainwater on roofs destroying those buildings. Either water would get trapped on lipped roofs and erode the ceiling causing leaks, or water would collect and run down the sides of buildings, slowly destroying the edifices.
To solve this problem, Egyptians, Greeks, and other antiquity cultures began to use spouted facets, that protruded from buildings, which could channel the water from the roof into a spout that would shoot harmlessly off the side of the building. This spouted conveyance system increased structural integrity and building longevity, and was highly popular, becoming a standard of design in later Roman architecture. The concept of gargoyles (and really, grotesques in general) then made their way famously into Gothic architecture, by way of development from Romanesque architecture.
So why did gargoyles fall out of favor? Quite simply, their practicality and cost. Gargoyles are typically heavy, carved stone, which were neither cheap to make, nor easy to maintain in their own right. Constant water flow made some structurally unstable, which resulted in a spate of falling gargoyles towards the end of their design era. Ultimately, modern guttering made them superfluous. Downpiping became the building standard in Great Britain at the beginning of the 18th century. The more austere, utilitarian designs of Georgian architecture (think of The Circus townhomes in Bath, UK) left no room for ostentatious grotesques.
Additionally… they kinda spooked people! Many grotesques/gargoyles, were intentionally designed based on pagan influences. They often reflected the local pre-Christian mysticism of wherever they were found. Indeed, the uppercase G ‘Gargoyle’ from history was, in legend, some sort of bat-dragon demon that terrorized the French countryside near Rouen, and was slain by the Merovingian king Clotaire II’s chancellor, one Saint Romanus. As the story goes, Romanus (either by himself, or with a lone volunteer), tempted the beast back to the city of Rouen, captured, decapitated, and burned the Gargoyle, mounting its head on the exterior of the church, to ward off other evil spirits. And so the notion of grotesques and gargoyles as wards against evil spirits was born.
But even with the best intentions, people still found them to be… well.. we can guess where the modern meaning of the word “grotesque” comes from. By the end of the lifespan of architectural gargoyles, they had accrued a reputation and an aura of “evil” that far outsized any structural value they still had.
So while gargoyles have seen (and might yet still see) some revivals in neo-Classical and neo-Gothic architecture, they’re simply not the most practical solution for the problem they were meant to solve anymore.
Sources:
Guide to Gargoyles and Other Grotesques, W.T. Gasch, 2003
Gothic Architecture, Paul Frankl, Paul Crossley, 2000
Gargoyles and Grotesques, Alex Woodcock, 2011
Architecture in Britain, 1530-1830, Sir John Summerson, 1977
While you wait for someone to comment here is a old post answering some of your questions https://www.reddit.com/r/AskHistorians/comments/2zkhpy/i_have_a_few_questions_about_the_gargoyles_of/
/r/bestof brought me here, and I love /u/Trontie's answer. Very informative.
With that said. My wife and I have dedicated to decorating our house "Victorian Gothic" style inside. What we would LOVE for the outside is two gargoyle statues on either side of the driveway. Sadly, what I have found are insanely expensive.