 Sometimes a candidate will withdraw after like the second or third ballot and give all of their delegates over to another candidate. This used to be quite common. So Abraham Lincoln is a sort of dark horse who comes out of nowhere in 1860. Woodrow Wilson in 1912 is nominated on something like the 37th or 38th ballot in Baltimore. It was quite ordinary for candidates to not even really be the frontrunner when they get to the convention, but somehow put together that majority.