What we, translators, do when translating a text, is basically made up of two steps: "understanding" the source text, and "writing" the target text.
However, the way machine translation approaches translation is completely different. Google Translate, for example, uses statistical machine translation, which depends on probabilities to get the best translation for each segment. That is, from a huge database of human-translated texts, Google finds the segment in the target language the has the highest probability of being the correct translation for each segment. As per the rule-based machine translation, it does word-for-word translation and adds complex processes, like analyzing the source text structure and sentences based on its information on syntax and morphology.
That said, both statistical and rule-based machine translation didn't reach the point where they can "understand" and "write".
Machine translation needs to utilize very advanced artificial intelligence (AI) to change that way of "thinking", or maybe just improve it.
But again, as of now, 2018, artificial intelligence is not yet that "intelligent".
Just look at how Google Assistant or Siri work - they are still in the phase where they are taught a limited amount of sample questions, and provided with a limited amount of answers. When you ask anything beyond these, they refer to search engines, which is basically seeking human answers.
The point is, artificial intelligence, at least in its commercial uses, cannot understand logic over the course of a text - machine translation is also there.
In order to achieve cohesion in translation, you need to have logical thinking to understand statements like "if all Nobel prize winners are rich, and John is a Nobel prize winner, then John is rich."
Here's an easy example of this logic when applied to translation:
If you're translating "You can't be hungry now because you have just had three apples."
Currently, a sophisticated machine translation service will probably not be able to guess whether "had" here means "ate", not "owned". Also, they can't distinguish whether "can't" means "are unable to", or "it's impossible that you are"... All that, and we are in the same sentence. If we're talking about a paragraph, machine translation has no chance to link these things. In fact, we tried to change the sentence structure and the machine translation sounded like it was just "guessing" randomly.
Now we have to give credit to machine translation for finding links like this occasionally within one sentence. But again, it's obvious that these are based on keywords that helped narrow the context, not because it could perform logical processes.
The fact that machine translation currently doesn't even try to understand makes us believe that the current pattern is not on the track towards fully-automated translation - it can improve, but it will never get close enough.
Even when we're on the track there, it won't be that simple!
Translation is a talent, an art, rather than a science. Often in translation, there's no "perfect match", because it's not just a transmission of words or meanings. For a long enough text, the possibilities become huge, and so it gets harder and harder to get closely similar translations for the same text as it grows larger. Ultimately, you can imagine that technology will replace human translators around the same time it replaces artists, musicians, or painters.
But why not impossible then? How would machine translation replace humans?
There are actually two scenarios where machine translation may replace human translation:
The first is the one mentioned before, which is when technology reaches the level when it can understand and write a text on their own - doesn't sound possible in the near future.
The other one is if machine translation output begins to become somehow an accepted standard. Let's face it, if you just want to understand a foreign text now, you won't need a translator anymore - you can use machine translation and you'll get a (probably) correct picture of what it's about. If the output improves, and as the samples obtained by statistical translation increase exponentially, we may reach a point where machine translation quality will be acceptable for most domains, maybe except for official documents or literary works. This is already happening gradually, and it will take from the jobs of low-quality translation business, and might take a bite or two from professional translation business in the future - not the foreseen one though.