Brooks didn't get Hackman to appear in the movie. It was Hackman that basically begged Brooks to let him do something in the film.
Wanted to show his comedy bona fides? He did!
I feel on the floor when he lit Frankenstein's finger on fire.