Why session state is not persisting between refresh?

Usually a session ends when the broser tab is closed or refreshed. I guess it can also happen after a long time of inactivity or conectivity loss.