Rotate a pivot to align with an edge
Using the “Center Pivot” option will not always give you the desired or expected pivot rotation and location. The orientation of the pivot becomes particularly important when you are planning to use the X/Y/Z scale trick to reflect an object in a particular axis.
Steps
Step 1) Select the object
Step 2) Go into pivot mode and select axis
Press the Insert key on your keyboard to go into pivot mode.
Then left click on the axis to align (it should turn yellow).
Step 3) Target Edge
With the axis selected from step 2, now hold down the CTRL key and left click on the edge to align to. You should see the word “orient” show up next to your cursor.
Alternatively you can also target to a vertex!
In that case hold down the Shift+CTRL key and click on a vertex (you should see the word aim show up beneath the cursor).
The pivot will now orient perfectly as seen below.
Conclusion
Note, the pivot change will not persist on the object on later selections unless you bake it. To bake the pivot, select the object then go to Modify > Bake Pivot.