The reason why store bought pecan pie is not refrigerated is because store bought pecan pies are made with preservatives as well as shelf stable ingredients.
The preservatives and shelf stable ingredients in store bought pecan pies make them shelf stable and safe at room temperature for a short period of time.
But for homemade pecan pies and homemade pies that contain eggs they should be refrigerated to prevent spoilage and bacterial growth.
Although store bought pecan pie does not need refrigerated, it's still best to refrigerate it if not eating it within a few days.
Other commercially made pies usually contain preservatives which inhibit growth of bacteria and microorganisms, which makes them more shelf stable.
And the overall composition of the ingredients in store bought pies also contribute to the long shelf life of store bought pies at room temperature.
Pecan pies, especially homemade pecan pies contains eggs, which can spoil quickly if left at room temperature for more than 2 hours.
If you plan to not eat the pecan pie even when it's store bought within a couple of days you should refrigerate it.
To enjoy the pecan pie it's best to take it out of the refrigerator at least an hour or two hours before serving or eating it as the room temperature pecan pie is much better.
Unlike a fruit pie, a pecan pie has a perishable filling that's prone to bacterial growth, which is why pecan pie should be refrigerated, especially if it's homemade.