I still hear announcers at races say the horses are coming down to the wire, but it's not always a close call. One horse could be way ahead of the rest of the pack by that point. But I can see where the idiom would be inspired by a horse making a late charge and almost catching up with the leader. The finish line, or wire, becomes much more of a consideration then.
If you think about the figurative meaning of "down to the wire", you realize that the wire itself can be part of the excitement, good or bad. When the US congress had to negotiate a budget to reopen the government, for example, the discussions came right down to the wire. Millions of people who depended on government funding knew exactly what that wire represented.