In most cases, the whole appeal of these bake sales is that you would be buying homemade pastry. The participants are expected, if not specifically required, to bake something themselves. If you don't have the time or don't know how to bake, don't volunteer. Or at least say upfront that you will be bringing a store-bought pie. But don't lie and try to pass such a pie as homemade.
In my opinion it isn't wrong to sell store bought pastries at a Bake sale. The time and skills that are required to prepare pastries and baked goods is often so much greater in cost and it is much more cost efficient to purchase, quality, professionally prepared items and resell them. It isn't a question of ethics it is a question of economics.