John's disciples and the Pharisees are fasting while Jesus was feasting. There was really only one day that Jews were required to fast --- the Day of Atonement. Other fasts were voluntary to ask for help or forgiveness. However, fasts were added twice a week for some people to show how religious they were. It was not mandated anywhere in the Scripture.
They used these extra religious showings to show off, basically. It was for man, not for God. In Matthew, it was written to not look gloomy while fasting like the people who used it to show off rather than to worship.
Instead, fasting is supposed to be for God. A passage in Isaiah says that God loves people who are giving and who look out for the less fortunate rather than those who put up a show of fasting. Fasting itself does not even appear that important to God. Instead, he wants his people to be working in the world for the good of others, not to show off how righteous they were for themselves, for their gain.
Jesus gives two examples --- you can't sew a piece of unshrunk cloth on shrunk cloth, because the patch will shrink and separate, and you can't put wine in old wineskins or they will expand more and burst. He meant that the new gospel doesn't pair with old Jewish tradition. Jesus was bringing something new. He was bringing salvation through faith in him. The tradition of fasting was not going to save these men. They couldn't hang on to the old. They had to accept the new, accept Jesus.
Jesus is exclusive. Faith in him is the only way to be forgiven and saved.