Well, i don't know if this is happening on purpose (in that situation cosider this as a recommendation to improve usability) but the undo button can't be used on format manipulations.
For example, in case i type some text and then make the text bold and then press the undo button, my text will remain bold and the last letter i typed will be deleted.Same thing happens with every kind of format (text colouring,fontsize etc.).
Yes, this is a limitation in the undo system where formatting changes don't appear to be recorded in the undo queue. The formatting changes will need to be expressly added to the undo manager so that they can be reversed.