The ancient Israelites brought an offering of the fruits of their crops that ripened first. This was done to acknowledge that God gave them their crops as a gift from Him. They chose this way to express their appreciation and gratitude for what God had done for them.
We do not know exactly where this idea originated; however, we have seen it in such cultures as Persia, Egypt and China. From the standpoint of the Scripture and Israelite history, it is seen from Genesis (Genesis 14:17-20) to the Gospels (Luke 11:42). The tithe is always acknowledged and recommended.