Beans and lentils have been widely used since antiquity. But one of the advantages of wheat is that it will thrive in drier conditions. Also you might find the processing of a small amount of beans easier than a small amount of wheat but that changes with scale and winnowing.
As for potatoes, though they do have advantages, typically need better soil, more water, are prone to disease and most importantly, they are a new world crop. While wheat was busy gaining a foothold in Europe and the old world for the last 10 000 years, potatoes were only introduced a few centuries ago.