I don't think it is 'very random'. It is 20 mins.
Storing session information for 40 instead of 20 minutes is not that big of a deal in my opinion. Especially on this site where I do not see the use of session data being used regularly (even though I think it should be more often). I would imagine the data being stored in tiny and would not be a problem.
And ALL activity in the forums at the moment is not counted as activity on the BB site which means if you are reading posts and replying for 20 mins you get timed out when you go back to the main site. This is being fixed in the new forums - currently in beta testing