Simple code may not always be the most efficient.
Thus the 1st stab at a piece of code is often based on speed and simplicity in writing it.
Only when proven to be inefficient is the code revisited and a more complex yet more efficient system designed.
e.g
If you’re counting sheep you might just put a pebble in a pile.
if you’ve 25 sheep that’s ok. if you’ve 25,000 you might develop a system of 1 pile for 10s, 1 pile for 100s etc
ex programmer (not hardware)