Is there a reason the barrier is right next to the footsteps, but the foe and discovery are off to the side?
There isn't always a barrier, and when there is the party can choose to resolve it or go back and try a different route.
Aren't the foes mandatory too?
The foes are mandatory -- unless you don't get past the obstacle, or you have surprise on your side and choose to go back instead of confronting them.
I know the discovery is often optional, but wondered why all three aren't on the entrance or on the side.
The location of the obstacle is important -- maybe each entrance/exit has one! The foes are on the side because the foe icon, along with the other icons, describe the room.