Elbows are not used only for offense, you can also use them for defense as Floyd Mayweather does. George Foreman used it too in his famous cross-armed guard, alternating it with the standard guard.
Framing can be used in offense too, especially when your opponent is having their back against the cage or ropes, you can push them with your lead elbow and redirect them wherever you want while charging with your rear hand.
Also, you can use framing in ground and pound, especially when you are in your opponent’s full guard or half guard.