The tradition of eating soba originates from the Tokugawa period, also called the Edo period, from 1603 to 1868.
Some establishments, especially cheaper and more casual ones, may serve both soba and udon as they are often served in a similar manner.