Why do alphabets have an order?
The short answer
A fixed order makes dictionaries, lists, and records easier to search. Modern orders inherit traditions from older writing systems.
How it developed
Alphabetical order is a historical convention, not a law of nature. Other writing systems use different ordering systems.
A familiar example
The same idea is used to sort file names and contact lists.