As far as I can tell you're asking how Session works.
Session persists user data in the web server's memory by a key. The key is stored in an HTTP cookie. On each request the browser sends the HTTP cookie to the web server. The Session API uses the key to find and load the user's Session.
Please read the official documentation.
ASP.NET Session State Overview
The difference between the first code block that uses Session and the second is the second code block does not persist the "Name" property between requests. The first code block saves the "Name" property between requests.
A couple of points, the first code block is not well designed. Session is volatile as it exists in server memory. Always check is Session exists before trying to use a Session value. Again, see the docs.
In terms of architecture, session exists in server memory. In a load balanced environment (multiple servers) only one server could have the Session state.