Arkham Origins Incident
The Pipe appeared in Concept Art and in the demo for Batman: Arkham Origins. It first appeared when the Riot at Blackgate happened and after Batman subdued a Mobster, Warden Joseph thought that Batman would hurt him, so he grabbed a pipe and swung at Batman.
Arkham Asylum Incident
The Pipe was the first melée weapon that was encountered in the game, and was used only by the Blackgate Prisoners. Although some henchmen would spawn with that weapon, others would rip it off of walls in the middle of a fight. Packing more of a punch than a simple strike, a successful hit from a pipe would temporarily distort Batman's vision. Unlike other weapons, the pipe could be Countered.
Arkham City Incident
The Pipe was the first melée weapon that was encountered in the game, and was used by henchmen and Dr. Stacey Baker (who thought Batman was one of Joker's Henchmen) to try to hit Batman. It could also, like in Arkham Asylum, be ripped off of walls. A succesful hit when Batman is using Detective Mode would make literally knock Batman out of it.
Arkham Knight Incident
The Pipe was again used by thugs, and that time could be manually picked up by Batman. While it eventually broke, it provided increased damage and the ability to bypass some thug's defenses.