The "mad organist" trope and Bach's Toccata & Fugue have become indissolubly entangled. And for good reason: baroque scholars described the "Stylus fantasticus" as "...the most free and unrestrained method of composing, bound to nothing, neither to any words nor to a melodic subject, it was instituted to display genius and to teach the hidden design of harmony and the ingenious composition of harmonic phrases and fugues".
Stories and legends about this piece abound, but to me it feels like if Bach wanted to write a piece to take any new shiny organ for a spin and see whether it had the oomph. Potentially also he wanted to show off. Very uncharacteristically perhaps, but who doesn't want to show off when they're sitting at the wheel of a shiny new sports car?
0:00 Toccata
2:46 Fugue