Now, the technical choices that lead to those things may not have been the wisest but the general thinking is that:
- the site is less functional without those cookies so requiring them ensures a common baseline for all users,
- they are used internally for things that are directly related to what the user is here for, so they are in a somewhat different league than all the cross-site targeting cookies everyone is concerned about, so they are less harmful.
But the truth is that saving to and reading from cookies is not an absolute requirement of building websites.
https://ico.org.uk/for-organisations/guide-to-pecr/guidance-...
This enables the websites backend to know who is making the request for authentication/authorization purposes.
Function how?
There are a lot of superfluous cookies because adding cookies is "best practice."
And frameworks make it easy.
And the added complexity makes programming mundane websites more interesting to the people condemned to doing so...inventing interesting problems makes people feel clever when cleverness is superfluous.