The movie was based on the play of the same name, which was written by Robert Shaw (Yes, that Robert Shaw – Quint in Jaws, Red Grant in From Russia with Love Robert Shaw. He wrote quite a few plays). For some reason they made quite a few changes, not all required for the transition to the screen. Shaw didn’t write the screenplay. But the section you’re referring to is in the original play. Both the play and the movie are based on the book of the same title, which Shaw also wrote.
Donald Pleasance played the part in the original New York run