Ramu learned that greed was not a good trait. He was taught a lesson in the royal court when the real owner of the tree was revealed. He ended up embarrassed in front of everyone.