Under the Act of Settlement, the crown goes to the heirs of Sophia, Electress of Hanover (who died in 1714), so long as they are Protestant.  In 1936, Edward was the senior heir, which is why be became king.
In 1937 he was still the senior heir, even though he ceased to be king.
Suppose Edward had a (legitimate, Protestant) child, and then died in 1940.  That child would then be Sophia’s senior heir, and could object that they had a better claim to the throne than George VI.  Or, they could wait until George died, and then claim that they had a better right to the throne than Elizabeth.  And the claim would be correct; not only would that child have a better right to the throne than either George VI or Elizabeth, but all of that child’s (legitimate, Protestant) descendants would have a better right to the throne than any descendant of George VI, for ever.
Nobody wanted that.  Hence, if Edward was to abdicate at all, the line of succession had to be altered to exclude not only him but also all his descendants.
They found this out the hard way when they deposed James VII and II, and gave the crown to his daughter Mary (along with William) and, if they died with surviving children (which happened) to James’s next daughter Anne.  James died in 1701 just before Anne came to the throne.  After a few years it became apparent that Anne, too, was likely to die without any surviving children, and the next person in line for the throne, beyond any doubt, was James’s only surviving son, also James, who was of course a Catholic.
Hence, the Act of Settlement, to resettle the throne on Sophia, the sister of James VII and II, who, conveniently, was Protestant.  To avoid this problem arising again, if any future monarch was to be displaced, whether by abdication or deposition, everyone understood that the displacement would have to extend not only to the monarch personally but also to the descendants of the displaced monarch (unless the monarch was being displaced in favour of his own descendant, obviously).