Latex with text at the end creates a newline

If you try to put some text followed by some LATEX and then again some text on the same line - then everything works just fine. Everything stays on the same line.

If you put text before latex, it also works fine. Everything also stays on the same line.

But if you put text after LATEX, then text is being put on the newline. And LATEX takes over a whole line + is being centered by default.