max_t helps you keep track of where the ray first intersects with an object and avoid unnecessary search.
Consider the scenario when there are multiple objects (or triangles of a mesh) along the path of a ray. Suppose you find the intersection of the ray and a triangle and get a t_value, you can set max_t to the t_value you just get for future query within the AABBTree. So you can avoid unnecessary queries if the min of the t_value of another bounding box you calculated (possibly of a non-leaf node) is larger than max_t, which means that the box is farther than your previous hit.
max_t helps you keep track of where the ray first intersects with an object and avoid unnecessary search. Consider the scenario when there are multiple objects (or triangles of a mesh) along the path of a ray. Suppose you find the intersection of the ray and a triangle and get a t_value, you can set max_t to the t_value you just get for future query within the AABBTree. So you can avoid unnecessary queries if the min of the t_value of another bounding box you calculated (possibly of a non-leaf node) is larger than max_t, which means that the box is farther than your previous hit.