The anchor point is the pivot for rotation and the center for scale. Move it, and your transforms behave exactly how you want them to.
Steps to change anchor point
Press Y to switch to the Pan Behind (Anchor Point) Tool.

Drag the anchor point crosshair to wherever you need it — like the bottom of a logo if you want it to swing from the base.

Press V to return to the Selection Tool and test rotation and scale — they’ll now pivot around your new point instead of the default center.

One more thing
Press Ctrl+Alt+Home (Windows) / Command+Option+Home (Mac) to instantly center the point inside the layer if you ever need to reset it.
Related how-tos
How to rotate objects in After Effects
How to scale objects in After Effects
How to animate text in After Effects
Need more help? Explore all our How-tos in one place.