Welcome to Star Trek Answers. What would you like to know?

Universal translator has an optical transducer to the communicator pin, it scans text and verbally synthesizes an English translationSome of it is due to the universal translator hidden in the combadge, and some due to experience with similar systems. In one episode, Data is required to interface with an alien computer that controls portals to other worlds because the system is too foreign for Picard and Worf to understand.

If you want a real-world answer, though, it's because of laziness by the writers. I personally would have written it so that the tricorder "hacked" into the alien system each time, because it seems a bit more plausible that a computer would be able to understand an alien system much quicker than a person could.

This is one of those instances where entertainment and science meet, and as always entertainment wins. In a hour program there just isn't enough to write in all those little things and still come out with an interesting show.