Going to the local shop you will find better bikes assembled by someone skilled and knowledgable. They can help you pick the right size and type of bike that will fit the style of riding you want to do. They will also almost always let you test ride the bike around the block.
Going into the big box store, you will find cheap, poorly made bikes slapped together possibly by someone that doesn't even know how to ride a bike. They will likely be a one size fits most and the styles will be limited in most cases. And I doubt you will get the opportunity to ride it.
In both cases, you will get what you pay for.
Perhaps middle ground is buying something used. Facebook marketplace and Craigslist always have something.
__________________
"It is the unknown around the corner that turns my wheels." -- Heinz Stücke