As Americans cast their ballots, many wonder why the results in some states can take days or even weeks to be finalised.