Only when complete context, and perspective of the Law get combined, can understanding of the reason for the comment about Idolatry Become understood.
The Expression of Love vs. the Selfishness
Will a man rob God? Yet you are robbing Me! But you say, ‘How have we robbed You?’ In tithes and offerings. 9 You are cursed with a curse, for you are robbing Me, the whole nation of you! 10 Bring the whole tithe into the storehouse, so that there may be food in My house, and test Me now in this,” says the Lord of hosts, “if I will not open for you the windows of heaven and pour out for you a blessing until it overflows. 11 Then I will rebuke the devourer for you, so that it will not destroy the fruits of the ground; nor will your vine in the field cast its grapes,” says the Lord of hosts. 12 “All the nations will call you blessed, for you shall be a delightful land,” says the Lord of hosts. (Malachi 3:8-12 NASB)
Its important to make the distinction between the church as the location, and the temple as the body. For most New Testament concepts must be looked at from the perspective of the temple as the body.
We must observe the command, do to others as we want done to ourselves
Whoever believes that Jesus is the Christ is born of God, and whoever loves the Father loves the child born of Him. 2 By this we know that we love the children of God, when we love God and observe His commandments. (1 John 5:1-2 NASB)
Summary: The proof that one has been born of God: Observing the commands.
The world vs. God's command
For this is the love of God, that we keep His commandments; and His commandments are not burdensome. 4 For whatever is born of God overcomes the world; and this is the victory that has overcome the world—our faith. (1 John 5:3-4 NASB)
Lets choose a need. Getting a drink of water. In the standard of the world, the person goes and gets the drink for the self. This act of stealing from God is normal behavior. This concept defines what is the standard of the world. Now those that first ask the person with them, "Do you want anything to drink?" Has made the offering and now stands acceptable in God's eyes, regardless of whether God wants to accept the offering or not. If God says, "No, thanks though", feel free to go get a drink for the self, for jealousy has been pleased. If God says, "Yes, could I have a drink of water". Go get God his water first, then get your own drink.
The testimony Jesus walks the Law the way God wants
Who is the one who overcomes the world, but he who believes that Jesus is the Son of God? 6 This is the One who came by water and blood, Jesus Christ; not with the water only, but with the water and with the blood. It is the Spirit who testifies, because the Spirit is the truth. 7 For there are three that testify: 8 the Spirit and the water and the blood; and the three are in agreement. 9 If we receive the testimony of men, the testimony of God is greater; for the testimony of God is this, that He has testified concerning His Son. 10 The one who believes in the Son of God has the testimony in himself; the one who does not believe God has made Him a liar, because he has not believed in the testimony that God has given concerning His Son. 11 And the testimony is this, that God has given us eternal life, and this life is in His Son. 12 He who has the Son has the life; he who does not have the Son of God does not have the life. (1 John 5:5-12 NASB)
The name defines the characteristics God requires
These things I have written to you who believe in the name of the Son of God, so that you may know that you have eternal life. 14 This is the confidence which we have before Him, that, if we ask anything according to His will, He hears us. 15 And if we know that He hears us in whatever we ask, we know that we have the requests which we have asked from Him. (1 John 5:13-15 NASB)
In what ever we offer to another we allow access to ourselves, for the perfection of the expression of Love that's our Lord Jesus, and the Father does for Jesus as a Father does for a Son.
Did I grab the world for myself, and ignore God again?
If anyone sees his brother committing a sin not leading to death, he shall ask and God will for him give life to those who commit sin not leading to death. There is a sin leading to death; I do not say that he should make request for this. 17 All unrighteousness is sin, and there is a sin not leading to death. (1 John 5:16-17 NASB)
Now while in the world, and looking at others, perhaps you have seen a person grab the world without offering to God. And perhaps Jealousy gets aroused, and even in his meekness, asks politely for his portion. At these times it's good to Be on God's side! For example, say a woman decides to do her makeup in the car, and begins to put on her mascara. And lets say the other woman in the car receives the Lord's jealousy, and asks, "Can I use that as well?" Nothing stands more noble then asking for God, for example saying, "Can she use some of that as well?". Indeed to the one that has loved the one next to them, the gates of blessings will Be poured out upon.
Those that give to God first do not sin
We know that no one who is born of God sins; but He who was born of God keeps him, and the evil one does not touch him. 19 We know that we are of God, and that the whole world lies in the power of the evil one. 20 And we know that the Son of God has come, and has given us understanding so that we may know Him who is true; and we are in Him who is true, in His Son Jesus Christ. This is the true God and eternal life. (1 John 5:18-20 NASB)
Always choose God over the world
Little children, guard yourselves from idols. (1 John 5:21 NASB)
In this expression, my John explains that one should guard themselves from loving the world more then the Love of God. For Idolatry occurs when anything stands in the place of God. When we take the world without considering God it makes us a thief. When we make our offerings we choose God. Therefore this could also have been written as, "Little children, guard yourselves from fulfilling your fleshly desires without first offering to please God."
Paul also explains it
But I say, walk by the Spirit, and you will not carry out the desire of the flesh. 17 For the flesh sets its desire against the Spirit, and the Spirit against the flesh; for these are in opposition to one another, so that you may not do the things that you please. 18 But if you are led by the Spirit, you are not under the Law. 19 Now the deeds of the flesh are evident, which are: immorality, impurity, sensuality, 20 idolatry, sorcery, enmities, strife, jealousy, outbursts of anger, disputes, dissensions, factions, 21 envying, drunkenness, carousing, and things like these, of which I forewarn you, just as I have forewarned you, that those who practice such things will not inherit the kingdom of God. 22 But the fruit of the Spirit is love, joy, peace, patience, kindness, goodness, faithfulness, 23 gentleness, self-control; against such things there is no law. 24 Now those who belong to Christ Jesus have crucified the flesh with its passions and desires.
If we live by the Spirit, let us also walk by the Spirit. 26 Let us not become boastful, challenging one another, envying one another. (Galatians 5:16-26 NASB)
Therefore let both accounts given by John and Paul give the correct perspective together. For indeed a person gets thirsty, God does indeed give the water to drink, and God has made it that the drinks a necessity. God simply wants to be thought of first, and that gets accomplished when we love others, and think of their needs first.
Then even as the Law states:
However, you may slaughter and eat meat within any of your gates, whatever you desire, according to the blessing of the Lord your God which He has given you; the unclean and the clean may eat of it, as of the gazelle and the deer. 16 Only you shall not eat the blood; you are to pour it out on the ground like water. 17 You are not allowed to eat within your gates the tithe of your grain or new wine or oil, or the firstborn of your herd or flock, or any of your votive offerings which you vow, or your freewill offerings, or the contribution of your hand. 18 But you shall eat them before the Lord your God in the place which the Lord your God will choose, you and your son and daughter, and your male and female servants, and the Levite who is within your gates; and you shall rejoice before the Lord your God in all your undertakings. (Deuteronomy 12:15-18 NASB)