“Session” as the term suggests is time-period when the client is interacting with the server.
HTTP however is a stateless protocol. i.e. Every request that goes to the Server is treated as a new request from a new client. So to glue the sessions funda with HTTP, the Scripting languages have to come up with something with which it can track the clients.