Yes, it was.
The Olympic Spirit that Samuel Gilleran refers to is widely left up to interpretation. For most athletes, I think the best way to honor the glory of the sport is to try one's best to win fairly. In this case, the goal is to win a gold medal without breaking any rules. It certainly does mean doing anything necessary, as long as it's not illegal.
In many cases, performing your best at all times is the surest path to winning a gold medal, and this makes everyone happy because it looks good and is fun to watch. However, in many other cases, it is simply NOT in an athlete's best interest to perform his/her best at all times. Some clear examples:
- Athletes purposefully slowing down to conserve energy in the preliminaries of track & field and swimming events
- In this Olympics: the Japanese women's soccer team purposefully playing to a draw, because it meant that given the tournament seeding, they wouldn't have to travel to a further location and endure travel fatigue
- In cycling, members from one team might purposefully slow down the group they're riding in, if that helps a teammate in a group farther ahead
- In baseball: players will bunt on purpose, pitchers will purposefully walk a batter
- In basketball: a losing team will often purposefully foul in the last few minutes if the game is close, in order to force 1:1 free throws
The list goes on. The reason these kinds of tactics develop is to optimize around the rules and overall goal of any given competition. In this case, the goal of the competition is to win a gold medal, and given the rules of how badminton draws are set up, the players simply thought this was the best decision strategically. They didn't do anything corrupt or break any rules - this was not match-fixing. Rather, people are incensed because the tactic happened to look particularly bad, from an appearance point of view. It just doesn't look as bad to slow down in the prelims of swimming or track. As bad as it looks, it's not the athlete's job nor should it be their goal to please the audience; their goal is to win a gold medal. As long as no rules are broken in the process, they should be able to use all fair strategies available to them. The rules should be rewritten.
I've really appreciated the debate here. Samuel Gilleran makes good points, and I appreciate that he looked up the rules. I still think it's a sticky situation, in that "not using one's best efforts" and being "abusive to the sport" are up for interpretation. I think the arguments for honor and spirit are valid; but I think one can also validly argue that what the players did was good strategy, and why is good strategy abusive to the sport? In the end, I still think the governing bodies didn't handle the situation well, placing far too much blame and punishment on the players.
I do think what the players did was distasteful, and I wouldn't want to encourage it. But I just don't think you can punish competitors retroactively for things you don't like. Examples of this:
- Swimming: in 1988, David Berkoff broke the world record in the 100M backstroke by staying underwater for almost half a lap on both laps. The swimming governing body did not like this, and now there's a rule that you have to surface by 15M. This is a good response; it would have been unfair to take Berkoff's records away, even if people didn't like his non-traditional tactic. 
- Running: recently, the IAAF decided that women's road racing records can only count in races where women run by themselves, as they don't like women pacing off of men. They then decided to take away previously set world records, including Paula Radcliffe's marathon record. This was met with great backlash, and eventually the IAAF reversed the decision. 
It is hard to find exact comparisons. There are some clear ones in soccer, as already cited; West Germany and Austria fixing their match in the 1982 World Cup, which resulted in a change to the tournament draw system, but no disqualification. In the NBA, teams routinely lose games on purpose to improve their position in the draft. 
The bigger point here is that people will optimize around whatever situation they're in; that's just human nature. We might not like it, but that's how things work.
By Samuel Gilleran, Observer
TL;DR: The players' actions were not only unsporting, they were unethical, in violation of their Olympic Oaths, and in violation of the rules of badminton.
No, it wasn't; it was a fair punishment. The athletes who attempted to tank these matches were in violation of the Athlete's Oath. The Olympic Oath states: "In the name of all the competitors, I promise that we shall take part in these Olympic Games, respecting and abiding by the rules which govern them, committing ourselves to a sport without doping and without drugs, in the true spirit of sportsmanship, for the glory of sport and the honor of our teams."
Now, let me be clear. This was a massive screw-up from the organizers. This sort of match-fixing has happened in badminton in the past  and observers predicted that it would happen in this tournament, as well.  In light of badminton's past history, this should have been a straight knock-out tournament, as it had been in the past. The badminton federation set itself up for failure.
That does not and cannot excuse the lack of sportsmanship shown by these four teams. It wasn't fair to the spectators who had paid good pounds to see top-class badminton, but more importantly, it was incredibly disrespectful to their fellow competitors. The insulting nature of essentially being told, "I'd rather play you than this other team, so I'm going to lose on purpose in order to play you" is staggering. Never mind that this entire situation was set up by a massive upset from the Danish team, which throws that sort of logic on its head.
Sportsmanship does not mean doing all things necessary to win the gold medal. The glory of sport does not mean doing all things necessary to win the gold medal. They mean respecting your opponents enough to give your best efforts in every match. This clearly did not happen in London this week. What happened was incredibly unsporting, and it certainly did not glorify sport. One might suggest that the Chinese efforts to get gold and silver, and the Indonesian and Korean efforts to advance farther in the tournament, would have honored their teams, but at what cost? Behaving unethically and possibly illegally does not bring honor; it brings dishonor.
Match-fixing is match-fixing, whether the payoff is thousands of dollars or a better spot in the next round of the tournament. It's not fair for athletes to point-shave, even if it doesn't affect the final outcome. It's not fair for athletes to spot-fix, even if it doesn't affect the final outcome. Don't forget, either, that people convicted of those two offenses have served jail time for them. If spot-fixing and point-shaving are unsporting even if they don't affect the outcome, how much more is fixing that actually affects the outcome of the match and tournament? The BWF and IOC were right to punish the players who threw the matches. Anything less would have been unjust.
EDIT/UPDATE: I'd like to respond briefly to some of the arguments that have been made in favor of the players. There have been suggestions, including in Sumi Kims answer, that no rules were broken by the match-fixing players. This is incorrect. The badminton players' code of conduct, Section 4.5, specifically countenances this sort of behavior. It says that "not using one's best efforts to win a match" is an "on-site offense" that carries the possibility of disciplinary action.  It is not in dispute that these players were not trying their best on the world's biggest stage. They were, by all accounts, in violation of Section 4.5. It is not legal in badminton to throw a match. The eight fixers violated this rule and deserve punishment.
Further, it has been variously suggested that players in every sport do this sort of thing. I can think of only two apposite examples: the Indianapolis Colts tanking at the end of the 2011 season to draft Andrew Luck (and similar draft-related tankings) and the famous West Germany-Austria match in which the teams agreed to a 1-0 W. German win (and similar situations, including the Japanese women intentionally drawing South Africa instead of winning in this Olympics). These situations are just as inappropriate as what the badminton players did. Every other example that has been brought up is inapposite.
- Runners or swimmers not running as fast as possible in heats distinguishes itself because it doesn't affect their competition. Whether Usain Bolt qualifies 1st, 4th, or not at all does not affect the fact that the other competitors will have the time that they themselves run.
- Baseball's intentional walks are specifically countenanced in the rules of baseball, as is fouling towards the end of a basketball game.
- Drafting in cycling or other fast racing sports is a normal part of the sport and is a strategy designed to win, not lose.
- Sacrificing a piece in chess, or conceding a round in boxing, are not apposite because those games are not determined by those events. We're interested in who won the chess match, not who captured more pieces, and who won the boxing match, not who won more rounds.
- Resting players during meaningless end-of-regular season games is slightly more questionable, but as long as a team is going out and attempting to win the game, I don't have a problem with it. Others may disagree on that point.
- What Summer Olympic event could an average-sized, middle-aged man or woman start training for and have the best chance to medal in 8 years?
- Has Great Britain Gold Medalist Bradley Wiggins hurt his image by tweeting about being plastered as he celebrates?
- If Michael Phelps played Water Polo, would he dominate?