I don't know about desktop computers, but in the late 80's-early 90's I worked for a peripheral company that made laboratory/light industrial I/O boards for TRS-80's, PC, etc.. Our rule of thumb was that selling price was roughly 5x Bill Of Materials cost. So a $100 relay board cost us around $20 in parts (and probably $5-10 in labor) to build.
Most of the non-parts cost was probably marketing expense.
These days I can buy a similar piece of hardware on Alibaba for $15!
It does when the volumes are low due to overhead and non reoccurring engineering. Back in the 80's took an engineer and draftsman a 2-3 months to design and layout a PCB with tape. Might spend $100k on engineering, overhead, and sales and sell ~500 units/yr. ($200/unit)
Ugh! Tape layout! I did that a few times in high school the cheap way (scotch tape/duct tape and a Sharpie). By the time I graduated and got a job as an EE, at least we had (crappy) PCB software so I never had to do it again except for a few hobby projects.
And now I can get OSS tools for free that totally blows away the state of the art at that time. Amazing!