Very often your photo editing software will be able to straighten and crop images at the same time, but there are still times you might want to treat them as two separate tasks.
Straighten
It’s very easy to accidentally shoot with the camera slightly skewed so that horizons or vertical objects aren’t straight. Most photo editing apps have a simple Straighten tool to put this right.