Why did the farmer say, 'Thank God!'?
The farmer said "Thank God!" because he was relieved that he had brought grapes instead of watermelons.
If he had brought watermelons, the King would have thrown heavy watermelons at him instead of light grapes, which would have hurt him badly.
Explanation
The story reveals the farmer's wisdom. When the King threw grapes at him, the farmer thanked God because he realized that if he had brought watermelons (which were also his best fruits), the playful King would have thrown those heavy fruits at him, causing much more pain.
Solution Steps
The farmer was relieved that he had brought grapes instead of watermelons
The King threw the fruits at the farmer playfully
Grapes were light and did not cause much pain
Watermelons would have been heavy and hurt the farmer badly