Jesus was speaking to his disciples and to John's disciples about John the Baptist, whom Jesus indicated they did not know. Jesus praised John. Why?
Because he respected John. He took baptism from John which means he accepted John as his teacher.
Jesus here comments about the people of his time - the people in the society surrounding Jesus at that moment: “To what can I compare this generation?"
Those people, Jesus is saying, were expecting things come to them easily. They saw themselves as the "chosen ones" - because they were Jewish - and they were expecting the privileges of this position.
This is sometimes referred to as a sense of entitlement. As though God is their order-supplier and they are the order-givers.
This sense of entitlement has pervaded to this day amongst many ecclesiastical institutions and their followers: It is a sense that Jesus died for our sins and all we have to do is pray and go to church, and God will do what we ask Him to do. When we want money, we ask Him to give us money. When we want health, we ask Him to make us healthy. When we want to win a contest, we ask Him to let us win. When we want to be famous, we ask Him to make us famous.
Then of course when we don't get what we want, we get upset and begin doubting God's existence.
This is not what Jesus came to teach us. Jesus came to teach us that we are God’s servants: We should do His will. Not that He should do our will. This is an important point in terms of understanding our position and understanding the Supreme Being, and understanding the purpose for the world around us. It is also important as we understand Jesus' life and his ultimate sacrifice: He was the ultimate loving servant of the Supreme Being.
Having a sense of entitlement is not consistent with loving service: They two are polar opposites. The citizens of the spiritual realm are committed to the pleasure of the Supreme Being. They don't have a sense of entitlement because they see the Supreme Being as the Owner and Controller of everything.
So the example Jesus gives: "We played the flute for you, and you did not dance; we sang a dirge, and you did not mourn," illustrates Jesus saw those around as feeling entitled. They saw themselves as the "chosen people" because of their birth into a Jewish family.
But Jesus taught that we aren't these physical bodies. They are temporary vehicles we occupy for a few decades. Jesus communicated this several times, including with this statement:
“I tell you, my friends, do not be afraid of those who kill the body and after that can do no more." (Luke 12:4)as well as:
"Therefore I tell you, do not worry about your life, what you will eat; or about your body, what you will wear." (Luke 12:22)Jesus was teaching that we are not these physical bodies. We are each the spirit-person within this body. Therefore, we are not entitled to anything with respect to these temporary physical bodies - our race or family we were born into or even what sect we may belong to. We are the children of the Supreme Being - His servants. Therefore, we have no rights of entitlement.