Why can I use a delay/timeline in a macro but not in a function?

What is the purpose of such a design?