Probably a rather low cost index (single digit), and winds inserted into the fms for several levels.
If the wind aloft at max altitude is much more favorable than below the optimum altitude can go up till maximum. If then the temperature is changing inflight the maximum altitude may drop below optimum.
Maybe that's what you saw.
On most flights you will find that optimum levels are some 2000 ft below maximum. Lower on high cost index, higher on low ones.