1. As Helping Out stated, gas appliances are always higher than electric appliances, and sometimes the difference is significant. And special order items are generally higher than stock items.
2. It is possible that on the day you shopped, the electric unit was on sale and the gas unit wasn't. Or perhaps they were both on sale but the sale tag for the gas model was missing.
3. If the retail on the gas dryer is $400 more than the electric, then Menards' cost is probably also $400 higher. I think you should be complaining about Whirlpool, not Menards.