This idea has been suggested often, but there's way more to it than you'd think.
One big problem is that batteries are heavy, and there are multiple problems arising because of this. The main thing being the packaging in the car.
You want a decent range in a car, so the battery will be large and heavy. If you put it in the front, the car will be front heavy, and it'll be understeered. The front will break out in the corner. Same problem when putting it in the back, it'll be oversteered, which can be even more dangerous for ignorant drivers. You'll notice that a disturbed weight distribution causes bad driving behaviour in general, from a car.
Placing it too high will also cause problems, the car will dive under braking and accelerating, and it'll roll in the corners. Long story short, batteries are annoyingly big and heavy and awkaward things we have to get stuffed inside a car.
If you make people use batteries on exchange basis, you can only have a few standard battery sizes and configurations, or it'll be unfeasible. This means the battery will never be optimal for a specific car. And this is why exchange batteries aren't a thing. (yet)
Others often mention that different batteries will have a different quality, but I don't think this really matters. If you you have a lease contract, or if you pay per kilometer, the battery quality doesn't matter anymore. Bad ones will just be taken outof the cylce and be recycled.
It would be feasible if only a few different cars were used on the road, so the number of batteries exchange stations need to have in stock is also limited. Or, we'll have to wait for batterytechnology to advance a lot, so we can have a decent range with small and light batteries. Then the packaging would be less critical and standard battery sizes could be a solution. Until then, i don't think we'll see exhange batteries being offered at petrolstations.