There are people who have asked and not received. The world is filled with poor who ask for wealth, sick who ask for health, lonely who seek companionship. How can Jesus claim that we get what we ask for when so many people clearly do not? Jesus clarifies this principle by showing how a father may give to his children.
I like to give things to my kids, but I know that it would be irresponsible and unloving if I were to give them everything they asked for. Instead I try to give them what is best for them. I give them the things they need -food, clothing, shelter. I also like to give them the things they enjoy when I can see how these things would be good for them.
My kids are smart enough to know what to ask for. They understand their Daddy well enough to know how and when to ask for ice-cream. If there is an activity or toy that we can enjoy together, they know they only have to ask.
Maybe the reason we don't always get what we ask for is because not only do we not know what to ask for and how to ask, but we also don't yet know our Daddy well enough.