It matters because rates can move meaningfully in that window, and a rate hold protects a buyer from a rate increase without requiring them to close early just to keep the number they were quoted, per Real Broker SK Ltd. pre-approval practice.
The lock only protects you if your purchase closes inside the window. A search that runs long can let the hold lapse, and refreshing it with the lender may reset the rate to whatever is current at that point.
Timing your pre-approval to roughly match how long you expect to shop is the practical way to use a rate lock well. Get your hand-reviewed valuation from Joel Dyck.