Explain why we set a cookie

I was confused by this, since setting the cookie is not necessary. 
Then I understood that setting it ensures maximum compatibility.