It's suppose to be a world language and not every language has a Subject-Verb-Object word order. Irish, for example, uses a VSO order. By allowing for a change in the word order, people that think in a different language can still be understood by anyone. So this sentence can be written as:
Ili renkontas lin.
Renkontas lin ili.
Lin renkontas ili.
Renkontas ili lin.
Ili lin renkontas.
Lin ili renkontas.
and they all mean the same thing. This might seem hard to learn, but not everyone in the world thinks in the same word order as you might. So it would be hard for them. There's really no possible way to make a language that would be easy for everyone due to how different various languages are around the world. This probably also explains why it's mostly spoken in countries where everyone already recognizes most of the words anyway.
With that case, it makes identifying the direct object easier regardless of where it's located. On top of that it's literally just adding an "n" to the word so once you realize what it is and how to do it, there is no memorizing tons of exceptions to this rule. Take English for example, you learn one rule only to find that there are tons of exceptions.
I think it might've been used to allow more play in sentence structure, or the creators of the language used it in their native languages and found it useful. Either way, it's part of Esperanto now.