What is the advantage of a tri-state output?
Tri-state is essentially 3 different states as you have seen. Instead of calling it ON and OFF, think of it as IN and OUT instead. The third state is not floating, it is in a high impedance state, which is essentially disconnecting it from the circuit. This means your 3 states are:


Input
Output
High Impedance (disconnected)


This is very useful in circuits that have a common bus for multiple components. With tri-state logic, components can either read from the bus, write to the bus, or be essentially disconnected so that it does not affect the bus, and will not be affected by the state of the bus either.

As an example of using tri-state logic is on a computer bus:



(Picture taken from http://www.lisbdnet.com/system-bus-functions-features/)

As you can see, multiple units are sharing the same busses. You don't want the information on the bus to be read by every unit at the same time. You also dont want them writing to the bus at the same time. With Tri-state logic, each individual unit can either read from the bus, write to the bus or just be disconnected. In this way, data can be sent back and forth and only the units that require the information will receive it. Imagine, with the above diagram, you receive an input to access a memory address, which then needs to be sent to a register, then go through the ALU, and finally the data is sent to the output. This can be done easily by changing the between the 3 states, so only the units that are needed will be connected to the bus at any time.