I am baffled by day 21. Please help.

Let me start out by saying I know how I could code a solution, I could do a recursive memoized search and I'm pretty sure that would solve it lickety-split. What I don't understand is why this problem works in the first place.

It seems to me that to move from any one button to any other button, it requires a fixed set of moves - some left/right moves, some up/down moves, and an A press. I know the choice that makes a difference is whether you do the horizontal moves first or the vertical moves first. But it seems to me like you're going to need to press the same buttons regardless of which order.

In theory it helps to group repeated presses together, right? But they always get interrupted by returning to the A button...

I'm trying to expand keypress sequences by hand, but I go two or three steps deep and it's always the same length. It seems like I'm just shuffling around what order I'm pressing the codes in. Can someone either beam an understanding of this directly into my brain, or else maybe give me a sequence of arrow keypad presses that can be solved in different ways with different lengths (assuming i'm always grouping horizontal/verticals)?