I think it's Christ's way to ask for cooperation and belief before he works a miracle. Over and over again he challenges people, and when they respond in faith and truth, he commends and rewards them. The Syrophoenician woman in Mark 7, the two blind men in Matthew 9 . . . I'm sure we can think of more.
Mary was just the first one (I do think I can see that 'mom look' before she turns to the servants and says, "Whatsoever he saith unto you, do it.")
Our Lord lovingly seems to decline: "What is that to Me and to thee? My hour is not yet come." Why? In order to call attention to that all-important element which made Him advance, as it were, the hour of His miracles - namely, Mary's abiding faith in His Divine Omnipotence. How much faith, indeed, is concealed in those words. "They have no wine;" "Whatever He shall say to you" - although you may not understand the motive of His command - "do ye." It was very important to call attention to this persevering faith in His Divinity, lest it appear that He was performing the miracle from a social motive, for the private benefit of His friends and acquaintances. Since Christ was not testing Mary's faith but rather showing unto us its perfection, He used a Hebraism which conveyed the idea at once of an importunity and an assurance of a request granted.