I was doing the following problem:
A solid cube of wood of side $2a$ and mass $M$ is resting on a horizontal surface. The cube is constrained to rotate about an axis $AB$. A bullet of mass $m$ and speed $v$ is shot at the face opposite $ABCD$ at a height of $4a/3$. The bullet becomes embedded in the cube. Find the minimum value of $v$ required to tip the cube so that it falls on face $ABCD$. Assume $m \ll M$.
I wasn't sure how to do this problem, so I checked this website for hints: https://www.physicsforums.com/threads/conservation-of-angular-momentum-help-needed.53833/
Here's the method they suggested (I'm consolidating the solution into one place for simplicity):
First, we need to determine the minimum angular velocity for which the cube will fall on face $ABCD$. For that, it needs enough angular velocity to rotate an angle of 45 degrees, after which gravity will help it down. So, we get the equation (by applying Conservation of Mechanical Energy):
$$Mga\big( \sqrt{2} - 1\big) = \dfrac{1}{2}\left(\dfrac{8Ma^2}{3}\right)\omega_{\text{min}}^2$$
This implies that
$$\omega_{\text{min}} = \sqrt{\dfrac{3g\big( \sqrt{2} - 1\big)}{4a}}$$
Now, we apply Conservation of Angular Momentum to relate the minimum velocity to the minimum angular velocity:
$$mv_{\text{min}}\left(\dfrac{4a}{3}\right) = \left(\dfrac{8Ma^2}{3}\right)\omega_{\text{min}}$$
(we are justified in neglecting the MOI of the bullet because it is given that $m \ll M$.)
After rearranging, we get that $v_{\text{min}}$ is equal to
$$v_{\text{min}} = \left(\dfrac{M}{m}\right)\sqrt{3ga\big(\sqrt{2} - 1\big)}$$
This answer checks out with the one given in the back of the textbook, so I know that the answer (and therefore the method too, most likely) is correct.
What I don't get is, why is angular momentum conserved in this case? Our system is the cube + bullet, and gravity, which acts through the COM of the cube, is exerting an external torque on the system.