Goes all the way back to the pilgrims and colonialists that first came to America. They didn't have plentiful grains to make beer with (which was more sanitary to drink than water at the time, so really important to have) so they would look to other fermentables. Pumpkin and squash have a lot of natural sugars, so it works. Of course, today's pumpkin ales are brewed with barley same as any other beers, and they add pumpkin to it for flavor as opposed to having it be the primary fermentable.