Flying higher gives lower fuel burn if you can get up there, so airlines take advantage. There are of course weight, wind and temperature dependencies, so every flight is different. The 787 and A350 also have a higher service ceiling compared to 777 and A330.