BEFORE
AFTER
Degree is not known. Is there a method to straighten an object? no need to re-create.
Now in menu Object ⇾ Transform ⇾ Align to transform orientation
Disable affect only origins back and press Alt + R. Object will be perfectly aligned.
In case if you are using older versions, and you haven't affect only origins option which was introduced in 2.81, you can do the following:
As before
Add new empty object and in menu Object ⇾ Transform ⇾ Align to transform orientation
Parent object to empty, select empty and press Alt + R
Select Object and unparent it Alt + P - Keep transform.
Apply transform Ctrl + A -> Rotation