It’s to stop a topic drifting too far off from the original reason it was started. (Ironically, which is what happened in this case!)
By default, it’s 5 days in the community and platform categories, but it should be noted that is 5 days after the last reply, not since the topic was started. I’d be interested in hearing proposals for what it should be set to if anyone has thoughts, this can be set on a category by category basis. (or indeed a post by post basis).
We can also unlock things if needed.