Why databases use ordered indexes but programming uses hash tables (evanjones.ca)

https://www.evanjones.ca/ordered-vs-unordered-indexes.html
A great analysis about a question that I had not thought of but is pretty interesting now that you mention it!