Obedience to God is never a waste. My friend ran for office out of obedience to God's direction, and I worked within his campaign for the same reason. Quite simply, we were doing what God had asked us to do.
There are many people in the Bible who obeyed God without seeing success. Abraham obeyed God by leaving his homeland and traveling to the land God had promised him, where he lived in tents his entire life, never seeing God's promises fulfilled. Moses obeyed God by demanding that Pharaoh free the Israelites, only to face Pharaoh's obstinate refusal and even harsher conditions for the Israelite slaves. Jeremiah obeyed God by preaching faithfully for nearly seventy years, even though the people refused to listen to his message, disregarded his counsel, imprisoned him, and tried to kill him. Hosea obeyed God by taking a wife that God had told him would be unfaithful and who ended up leaving him and giving herself to prostitution. Hebrews 11:35-39 describes people who obeyed God but still faced torture and death without ever seeing God's promises fulfilled.
History reveals additional stories of men who obeyed God only to end in "failure." David Brainerd was a promising young man who obeyed God's call to preach to the Indians. He died before age thirty, his potential seemingly wasted. Jim Elliot and four other men obeyed God in reaching out to the savage and unreached Auca tribe; they were attacked and murdered on their first trip to meet those people. Adoniram Judson obeyed God in going to Burma, where he faced tremendous trials (including the deaths of two wives and three of his children) and worked seven years before he saw a single convert. Man would look at these situations and declare that these men had wasted their lives.
This sense of a wasted life reaches into the modern day. Pastors give their entire lives to a church, only to see people walk away from God or even to see their efforts destroyed by a church split. Some ministries thrive until a new leader comes along; as the ministry embraces liberalism, it would seem that the founder's efforts were wasted. Dedicated teachers devote their lives to a Christian school only to have that ministry close down for lack of finances. I personally know two good men who obeyed God by taking on a pastorate in a new place, only to have Him direct them back to their previous place of service in only a year or two. Parents pour out their lives trying to encourage their children to walk in God's ways, only to see them turn their backs on God. Believers witness to friends, family, and coworkers for years with no apparent result. In each of these cases, it seems that the effort, perhaps the entire life, was wasted, even though it was based on obedience to God.
Obedience is linked to difficulty. Hebrews 5:8 reveals that even Jesus learned obedience through suffering. Obedience is not learned by a life that is easy or that follows what the person wants. Children, for example, do not learn obedience by being commanded to go for ice cream or play a game; they learn obedience when they are instructed to eat their green beans or clean their room. When life is hard, disappointing, or seems worthless, but a believer follows God anyway, he is learning deeper and more consistent obedience.
Army boot camp provides another good illustration. Some of the instructions and drills may seem extreme, unreasonable, cruel, pointless, counterproductive, or even impossible, but learning obedience is critical both to the individual soldier and to the army as a whole. Obedience makes a man into a soldier, and it makes a group of soldiers into a unit that is prepared to face the enemy, follow commands, and act purposefully in battle. On D-Day thousands of young soldiers obeyed the command to storm the beaches of Normandy, and huge numbers of them died in the process. While it is sad that those men had to die, an objective view of history confirms that they had to. Their loss was not a waste, because it was only through that loss that the objective of victory could be achieved.
Whether it be the Bible characters, the historical figures, or the modern day examples listed above, obedience (and the resulting loss) is necessary in order to achieve a greater objective. All of those people were right to obey God. They may never have seen the results of their obedience, but God worked through each obedient response to achieve His desired objective and sometimes a dramatic victory. In spite of the confusion, frustration, or discouragement, the outcome of obedience must be entrusted to God. Obedience is always the right thing to do. It reveals a heart that trusts God. It demonstrates a submission to follow Him. It shows a sensitive spirit that is dedicated to God.
God receives glory when Christians obey. He also honors that obedience and uses it within His plan. God determines the outcome; He only asks believers to follow His leading. Whatever God asks, even if it seems hard, if success seems unlikely, or if past results have been disappointing, the believer must obey God. Then in spite of the results that people see, the obedience is never wasted.
"The people said to Joshua, 'We will serve the LORD our God and we will obey his voice.'" Joshua 24:24 (NASB)