It is because you are appending a new <title>
element every time the bars change. The append should be done once on the enter selection and then simply update the value of the title in the update selection.
Here's a modified version of your code with some comments inline (I've removed the parts that aren't relevant to the tool tip):
layer.enter()
.append("g")
.attr("class", "layer")
.append("title"); // add new element under new layer
// add or update the value of the title element
layer.select("title").text(function(d) {
return d[0].s;
});