AsyncBefore and Asyncafter

What are this asyncbefore and asyncafter?
What are their use cases?

You’ve actually stumbled into a very long and complicated topic.
In short - they create a transaction boundary.
Reading the transactions section of the docs will give you a good understanding of the use cases (of which there are many).