Are cabin dividers used to "hide" the flex of the airplane?
Was my fellow passenger right?


No.

That photo is taken in a B777-300 (2 aisles, 4 seats in the centre and three at the sides, lavatories only behind the central rows, rows on the left side of the aircraft are one more than the central ones at that location):



As you can see the wall is just were an emergency exit is, and if you will look on the other side of the wall you will find a "jump seat", i.e. a foldable seat used by the crew, and the wall is there for it.

Also, walls help in dividing the aircraft in different classes.