Menards appears to me to be an intelligently run company- I have noticed the Menards stores in my area now carry a limited stock of grocery items and also pet foods. I feel that few other 'home supply' stores in my area stock this variety of items.
It's very convenient for me to stop at Menards for a home repair item (or six) and pick up a few grocery items at the same time.
I believe the first store chain to do something like this was Meijer markets who called their stores 'Hypermarkets'. In SW Michigan (where Meijer originated), it's difficult for other stores to compete with Meijer due to their concept of 'one stop shopping'.
I would not be too surprised if Menards is following the same business model, but from a different angle.
As far as the Train hobby is concerned- I had heard some time ago that someone in the the Menard family (John?) is a train enthusiast. Perhaps it's as simple as their way of giving back to the hobby? It would not surprise me in the least if this is the underlying reason for Menards being in the scale train business.