Doors are large, sturdy, finished pieces of flat tree-product. They are very cheap compared to material intended for counters, and are available used for free. They already have a hole (doorknob) for you to put your cables through.
For legs you can use some combination of: shelving, filing cabinets, sawhorses, brackets+lumber, and a-la-carte legs.
At my parent's software startup they used doors for desks for their whole 20-year run. Be careful though -- with great surface area comes great responsibility! Once my mom's desk clutter reached critical mass, it stayed that way for 15 years (18" deep in the back, 2" in the front).
It is questionable whether in the age of IKEA, the door desk is still truly frugal, but it is a very tangible reminder of the principle. Very tangible, very sturdy.