It is very hard to develop perfect hardware for all the segments and the camera technology is slightly lacking behind, at least in terms of thickness. Smartphones are very thin nowadays, but camera sensors are still not thin enough so companies tend to design smartphones with the camera bump.
Galaxy S6 had a pretty big camera bump, measuring 1.7mm. The company managed to partially fix it with the Galaxy S7, which has 0.8mm camera bump. The new Galaxy S8 will be slightly thicker, measuring 7.3mm, and that might have helped Samsung to completely remove the camera bump, at least according to the leaked image.