Where does an idea come from?

Where would even the idea of a table leg or chair come from? If thought precedes physicality, how is even the very essence of an idea realized?

Idea of Table, of Chair

I believe the ideas spring from frustration. For example many many humans struggle along with no chair. They may start with sitting on logs around the night fire and gradually over a very long period of time get to the possibility of sitting in a room.
That of course imagines that rooms are conceived and then built.

It is interesting to note that chairs in the 1500's in Europe were only for servants. The "quality" people stood in their dress clothes, for many hours at a time.