You raise a good point--more and more manufacturers are making phones with a midrange price but with impressive specs and performance. But there are still some disadvantages, if you look at the comparison:
Samsung Galaxy A5 vs Samsung Galaxy S6 - Phone specs comparison
1. The A5 is only 720p, so if screen resolution is important, the S6 and its 1440p screen is far superior.
2. The S6 has a 16 MP camera, compared to the A5's 13 MP camera--this isn't a huge difference, but where it comes in handy is if you want to crop a photo down significantly. The resultant photo will be better resolution with the 16 MP camera.
3. The S6 is capable of 4K video recording.
4. The S6's processors are significantly more powerful, which is important for processor-intensive apps like complex games.
5. Flagship phones are always more likely to get system updates for a longer duration than midrange phones (although updates bring their own potential glitches, so people should always be careful what they wish for!).
On the other hand the A5 still has a microSD slot (which is best used for storage of media like photos, videos, and music).