According to this question about the thirteenth amendment and by extension this source it references, both say that Schuyler Colfax, the speaker at the time did not vote on the motion to reconsider the thirteenth amendment. The question claims that this was due to custom and the source says that the speaker was not required to vote in such matters and therefore does not unless it is "politically useful". Was this true in that time period or is the source backdating a custom? I question the narrative established by the source because their about us page says, "We publish the status of federal legislation and information about your representative and senators in Congress." (bolding mine) This makes me think that it was designed for the modern day leading me to question its accuracy in relation to historical fact. If so, why didn't Schuyler Colfax vote? Otherwise, how did this custom develop?
This custom developed because it was always the custom of the British House of Commons, from which most legislative traditions of the United States ultimately derive.
This custom also serves a functional purpose in the assembly: to maintain an illusion of (at least partial) impartiality on the part of the Speaker, as a means of enhancing his authority on thorny issues; by only voting, and thus revealing his mind, when such is absolutely necessary.