From bash manual
Aliases are expanded when a function definition is read, not when the function is executed, because a function definition is itself a compound command. As a consequence, aliases defined in a function are not available until after that function is executed. To be safe, always put alias definitions on a separate line, and do not use alias in compound commands.
I understand there might be some potential problem of using alias in a function definition, although still have some doubts about Which of the following shell operations are performed inside the function body when running a function definition and when calling a function?.
But why does "do not use alias in compound commands" generalize from function definitions to general compound commands?
What other kinds of compound commands can have what kinds of problems with alias?