Short form of document. A written thing kept as a reference.
Latin documentum, a lesson or proof, from docere (to teach); doc is the modern clipping kept for a written reference.
A written thing kept as a reference, its old name shortened to fit how quickly it gets pointed at. A doc is meant to be found again, not admired once.