Historically, it was used for documentation in plain-text format, particularly of programs or computer hardware, on a wide range of operating systems.
Doc (an abbreviation of document) is a file extension for word processing documents it is associated mainly with Microsoft and their Microsoft Word application.