You shall tithe all the produce of your fields (Deuteronomy14:22).
The Hebrew text lends itself to an interpretation that if you tithe your produce, G-d will bless you. You will not lose by tithing.
The Chafetz Chaim told of a peasant who brought his bundles of grain to the market. For each bundle he delivered to the merchant, the latter put a coin into a plate. By counting the coins, they would know the number of bundles he sold.
When the merchant was not looking, the peasant took a few coins from the plate. He didn’t realize that by stealing a few small coins, he was losing the much larger payment for a few bundles of grain.
Sometimes we do things for a temporary gain, and do not realize that the loss of our act will far outweigh the temporary gain.