Q: The Danelawthe Anglo-Saxon ChronicleBeowulf was a portion of England which the Anglo-Saxons ceded to the Danes to avoid more warfare.

A:
England didn't actually exist as a nation back then, and the Anglo-Saxons were only on the verge of beginning to unify.
I think what you are refering to is the Treaty of Wedmore 878CE. [ This drew a boundary between the Danelaw and Wessex controlled territory, which looked like this.
The only Danish signatory was Guthrum, so the treaty meant nothing to other Danes who were not under his

leadership. It was a matter of luck that Guthrum would be content with the land he had already taken. Younger and hungrier Danes would not have honoured that treaty for very long.
So the treaty was not intended to avoid more warfare, but to buy time for King Alfred to organise and fortify Wessex, and the southern part of Mercia under his indirect control.
So he built a series of fortified towns (burghs) along the frontier with the Danelaw, and arranged the militia (Fyrd) so that he always had enough men in service to garrison the Burghs in case of Danish incursions.
He also built a navy to counter the Danish threat at sea.
Once he had a strong enough base, he started to attack the Danelaw, and push it's boundaries back. This started a process that was mainly carried out by Alfreds son, Edward the Elder, and completed by Edwards son Athelstan, the first King of England, in 927CE.
Some say that Egbert, an ancestor of Alfred the Great, was the first King of England, but in reality, he was a Bretwalda, which is not the same thing at all. ]