The straighten feature relies on well-defined, high-contrast, rectangular edges on the scanned document, as well as some image content, to determine the correct rotation required to straighten the image. This function also expects the scanned document to be located away from the edges of the scan window.
You have the option of manually rotating an image, if the automatic straighten feature is not working as well as you want. To manually rotate an image, use the Rotate, Arbitrary command in the Image Editor.