Writing is not transcribed speech. The earliest writing systems — Sumerian cuneiform, Egyptian hieroglyphics — emerged independently to solve administrative problems: recording grain tallies, tracking temple inventories.
The phonetic principle (representing sounds rather than meanings) appeared later and spread unevenly. Chinese writing never made the full phonetic turn; it retains a morphosyllabic structure where most characters represent meaning-sound combinations.
Alphabets are a late, local invention. The Greek alphabet (adding vowels to the Phoenician abjad) is roughly 2,800 years old. The history of writing is mostly not-alphabets.