Why don't they have two black boxes? Why is it that black boxes don't float? 

From what I gather the answer is:


  So they will not float away from a water crash site. The ping can be heard underwater with sonar. Finding the ping, finds the site.


But why not have two black boxes one that floats and one that stays with the aircraft?

That way if a plane is lost at sea, if we find the black box floating, we could use the data to find the other black box and the crash site. Plus the benefits of having a redundancy are enormous.
The added weight, space, and complexity of a second recorder have to be taken into account, and all are very important for an airplane.

If you are just interested in location, then there could just be a simple beacon designed to float. Although less, this will still have the above costs. And you have to design something light enough to float, sturdy enough to survive an extremely violent crash, yet still be a functional electronic device.

Considering that the situation of a lost aircraft at sea is fairly rare, it is questionable whether the benefits justify the costs.