The only advantage of this swapped values I can think of, is that when you have a wall with its reference line in the center with two labels, one display the outside surface and the other inside. When you "Flip Wall on Reference Line", the wall and both labels stay in the same location but the values are changed without having to go into the label's setting to change what to display (outside/inside).
If you write your own GDL, there's another situation that WALL_MAT_A and WALL_MAT_B return swapped values is with slanted wall. What I found out is that it has something to do with flip status (WALL_FLIPPED). You might want to take this into account in your code.