Question: Suppose that a Tor client wants to access a certain hidden service. According to the protocol, instead of submitting a request directly to the server IP (which is hidden[1][2]), this client submit a request via a series of relays. 

However, at some point, there will be a final relay in charge of delivering the client's message specifically to the server running the hidden service. In order to do so, this final relay must know the IP of this hidden server, otherwise the current internet infrastructure cannot deliver the message.

If the aforementioned steps are indeed correct, this means that in order to host a website using TOR Hidden Service you must reveal the IP address to a final relay. Therefore, Tor network does not hide the IP address of hidden services.

How to reconcile that? Am I missing something?

---

[1]: "TOR Hidden Service allows you to host a website, without revealing where the website is, and hence protects the identity of the publisher/webmaster.", [WikiBooks](https://en.wikibooks.org/wiki/How_to_Protect_your_Internet_Anonymity_and_Privacy/TOR_Hidden_Service_for_Anonymous_Websites)

[2]: "The Tor network hides the IP address of hidden services, instead using onion addresses and public keys to keep the real location hidden.", [Privay.net](https://privacy.net/make-site-visible-dark-web-tor-hidden-services/)

Answer: 
Tor uses TCP tunnels, so - regardless of the previous answer - no need to use it. The hidden service is reached from the Tor node that is hosting it, usually through a localhost. The scenario you've described about IP revealing - yes, it *can* be a privacy problem. The design doc states clear - the system is anonymizing mostly the client, not the server - it's only rudimentary in a *standard* setup. To conceal your server IP use bridges-only for your hosting server(s) - that will elevate the privacy, but if you want both client and server to be equally anonymized - use I2P, not Tor - it's designed for exactly that purpose
This is a bit of a simplistic explanation, but I hope it helps.

The Tor service, running on the machine where the onion service is being hosted, reaches out to the Tor Network and says, if you want to use onion abcxyz.onion or port 80, then you have to talk to me (the service) but not to the IP of the machine. Because the connection is originated from the machine being hosted and not from an external machine, no actual IP is needed to be shared.

To look at it another way.

I set up a web server on standard TCP port 80
I make sure that my firewall is closed on TCP port 80 so nobody can connect to that web server. (sounds pointless, right?)
I then tell the Tor service to advertise that web server on Tor so people can view it. 
You say, "but wait you have a firewall up, they won't be able to see your web sserver!"
That would be true if I was expecting external users to connect to me.
Instead, the Tor service connected to the Tor Network via UDP (not TCP) and other people are able to use that connection to come in and view my web server even with the firewall turned on.
Nobody ever sees my IP because that UDP connection from my web server to the Tor network doesn't contain TCP/IP informatation. It just contains an address and a connection to get in.