There are lots of ways that LFS can compete with chain stores, most of this has probably been stated already.
They don't have to have the same or lower prices. This is because they can do things that chain stores can't/won't do. For example, if I went to PetSmart and wanted a 125 gallon tank, I'm S.O.L. BUT my LFS would be more than happy to order one for me. They can even order me in a custom built stand in the color I want, at the height I want the tank to sit, with more or less doors, etc. Also, chain stores typically have the normal fish and are very limited in their selection (if they have any selection at all) of SW fish. Most chain stores (except Petco) aren't willing to touch SW fish. Even then, their stock is "common". LFS take advantage of this by offering these common species PLUS having the not so common fish/inverts/corals/plants and the ability to order them if someone is looking for them. I've also found that not only do the LFS have better advice, they usually have experience in dealing with a certain situation such as breeding a difficult fish, medicating an unhealthy fish, problems between two fish in a tank, etc. Most employees in a chain store have little or no experience with these situations and when asked for help in medicating a fish for example they go to the bottle and read off the label and say "this should work" to you. Not exactly the advice I'd be looking for...any idiot can read a label. The most important things that an LFS offers to stay alive are 1) helpful advice/expertise, 2) a variety of specimens to choose from, 3) the willingness to form bonds with customers.