To find one customer's orders, the database has to look at every row in orders — a full table scan. With 16 rows, nobody notices. With 16 million, every page load waits.
An index is a sorted copy of one column with pointers back to the rows, like the index at the back of a book. With one on customer_id, the database jumps straight to the matching rows.
EXPLAIN QUERY PLAN shows how SQLite intends to run a query without running it. SCAN orders means every row; SEARCH orders USING INDEX means a jump.
Try it
Read the plan, add the index, read it again. Watch the scan sweep every row — and then not.
Indexes aren't free: every INSERT and UPDATE has to keep them current. Index the columns you search and join on, not everything.