(Be) Asking for It

What does the expression “be asking for it” mean?

Definition: act in such a way that invites punishment or trouble

Example: I told you to do your homework two hours ago, and you still haven’t done it. You’re really asking for it.