The duration of the session is the sum of time spent on the pages a visitor viewed on your site.
By default, the time on page is calculated as the difference between the start times of every sequential page view.
For example, a visitor entered your Home page at 10:00am, later moved to a Contact page at 10:10am, then opened a Product catalogue at 10:20am and left your web resource.
The timings will equal:
- Home page: 10:10 - 10:00 = 10 minutes
- Contact page: 10:20 - 10:10 = 10 minutes
- Product catalogue: 0 seconds because there is no second point of time. A user left and GA cannot tell us when he did it.
So the session duration of this user will equal: 10 min + 10 min = 20 minutes
Of course, I understand that a website owner would feel a bit sad that Google Analytics failed to properly track time a user spent on the Product catalogue page. That is why Google Analytics lets you help it by configuring custom events on your website, so it will track time not only between page views, but also between sequential user interactions (button and link clicks, scrolls, transactions, form submits, etc.)