Although China made it clear that these facilities will not be used by the Chinese Navy, Chinese firms will run (as well as build) the facilities, and getting an agreement from Tanzania to allow Chinese warships to come by for supplies and shore leave should not be a problem.
The Chinese government has refused several navy requests for overseas bases but as more Chinese warships operate in the Indian Ocean, and off East Africa, there will be a need for ports where these can reliably obtain fuel, supplies, and some repairs. What better port than one run by a Chinese company. China has a similar deal with Pakistan, where the port of Gwadar (located near the Iranian border) is being upgraded by China. The Chinese plan to also build a naval base that would be used by Pakistani and Chinese warships and aircraft. This would be a Pakistani naval base, which the Chinese Navy having access.