Human beings have built tables for millennia; there's evidence the Egyptians had tables 4,500 years ago. The one pictured below, excavated from upper Egypt, is a mere 3,600 years old:
Humans would not design desks until millennia later. Invented specifically for paperwork, their emergence had to wait for both the invention of paper and the need to do work on it. The Chinese invented paper around the 2nd century BCE, and they presumably weren't using each other's backs as a surface ("Dude can you turn around? I need to sign this scroll"), so we can assume they developed desks. However, there are no existing records, at least not that we can access.
The first time we see anything like a desk pop up in the human record, is in 13th century European monasteries. (That doesn't mean that's when and where desks were invented, it's just as far back as we can find depictions.) And by modern standards they are weird looking:
That's the Dominican friar Vincent of Beauvais, circa 1220, either composing dope rhymes or copying a religious text. At the time paper was a precious, difficult-to-make material, and few people were literate; paper was used primarily in monasteries, for religious manuscripts and documenting history.
The drawing was produced around 1480, and we have no way of knowing which elements were fabricated by the illustrator. For instance, the single gooseneck leg, apparently fabricated out of tubular metal, doesn't seem likely.
Leg aside, other elements of the "desk" do appear in other depictions from the era, and these features reveal that their designers/fabricators were ergonomics-minded. The writing surface is slanted, like drafting tables would be half a millennia later, placing the paper within easy reach and perpendicular to the scribe's line of sight. The two red cords hanging off of the back are bookmarks (there's two because these desks would often have two books side-by-side, one being the source material, the second being a copy produced by the scribe). The little hidey-hole on the side was used to stash smaller scrolls and, I guess, a tomato.
In this woodcut from the Kalendier des Bergers ("The Shepherd's Calendar," a French guide to moral living and practical advice from the 15th century), we see a medieval monk sitting at a similar desk, where the profile is a right triangle.
This one is on a proper base, and we can see that tomes were stored within it. The hidey-hole in the side of the writing portion of the desk also appears to have a tome inside; we can assume the writing surface was hinged or removable for access.
The two designs above are for properly bound books. But during the same time period, there was an alternative desk form designed specifically to accommodate scrolls. Here we see a 15th-century depiction of a birdhouse-like design, where the profile of the desk is an isosceles triangle.
The A-shape is form-follows-function, allowing a scribe to advance a scroll over the top of it, with some support on the back side offered by the tilted surface.
Note the upper unit—this is something like a stacked-dual-monitor set-up used by office workers today. The upper unit probably held the source book or scroll that the scribe copied from.
The tomato storage hole on the lower unit appears to be blocked off, but we can see the upper unit has a scroll stored in its side. The little bottles on the side shelf of the lower unit are presumably inkpots.
Lastly, note the bookmarks. My guess is that they're heavy pieces of metal. The one on the top unit would need to be heavy enough to hold a large tome open. The one on the lower unit, which looks like a taxi air freshener, isn't so much a bookmark as a weight to hold the scroll in place.
This woodcut below, created in the 19th century but depicting a 15th century scene, shows a sort of hybrid design between the previous two styles. The profile of the desk is a scalene triangle.
Again we see what are probably inkpots, but here mounted to the panels. The hidey-hole is an odd oval shape, and the space within probably held scrolls, writing implements or perhaps a stubby zucchini stored vertically.
As for actual pieces, the photo below is of existing writing desks in the Monks' Hall of Portugal's Alcobaça Monastery, which was established in 1153. The date of the desks' construction is unknown; it's possible they're historical reconstructions.
Assuming they're faithful, we can see some elements that appeared in the woodcuts above: You've got the hidey hole, though here it's a more rational opening that extends to the tabletop, like a miniature doorway; the 45-degree slanted surface; and the lower shelves on the side that presumably held inkpots.
As for why those shelves always seem to be located lower than the writing surface and on the side, I assume this is a human factors touch, meant to account for clumsiness. With the inkpots located on low side shelves, there's a lower chance of splattering ink on one's clothes or on the work. In reality, I imagine the sides of these tables were well stained with ink.
The rooms where monks would perform writing work were called scriptoriums. Today there are still people making these scriptorium desks—but not in the way you'd think. These medieval furniture designs have captured the imagination of gamers, and thus you can find both miniatures and 3D-modeled versions, as seen below, available for sale online.
Join over 240,000 designers who stay up-to-date with the Core77 newsletter.
Test it out; it only takes a single click to unsubscribe