Some scholars believe 工 is a pictograph of a carpenter's square while others believe it is a pictogrpahic representation of a spade, or shovel, or a tool for tamping earth. Nevertheless, the general concept is that 工 is a pictograph of a tool used for work, hence its meaning.
The idiom “巧夺天工” (qiǎo duó tiān gōng), "Workmanship surpassing the beauty of nature", is used to describe intricate craftsmanship and comes from a story about Lady Zhen in Romance of the Three Kingdoms. Lady Zhen wanted to retain her youthful beauty for her husband as she aged. After observing the intricate contortions of a snake in her garden, she began fashioning her hair after them. Over time and with hours of hard work she developed many beautiful and intricate hair buns which she changed everyday. These intricate designs are now known collectively as a "Snake Bun" which are regarded as “巧夺天工" (qiǎo duó tiān gōng).