We have a large GitHub organization folder job (over 100 repos) that is scanned every 15 mins for changes. Occasionally (usually overnight I think) branches are losing the build history and are reset to build number 1.
I suspect the branch indexing is somehow losing communication with GitHub and the branch is deleted and then recreated on the next successful scan. Note this doesn't appear to happen in business hours, so possibly is a result of overnight resource conservation (Jenkins is not currently shutdown overnight).
As a workaround I have configured to not delete branches unless unchanged for 7 days, however some branches are not updated this frequently, and I don't want to extend this period as we'll have too many jobs hanging around.
Note also that we don't currently use webhooks to detect changes, which is why it is a periodic scan every 15 mins.