Out of school suspensions, while sometimes necessary perhaps for sever incidents, are generally ineffective, especially for minor infractions. Given that in most families, both parents work now, suspended kids often just get an unsupervised day at home - especially when you factor in how many of those kids are coming from single-parent families. Also factor in that, in general, it is unfortunately true that kids from low-income backgrounds get suspended more often, and now the kids being kept out of school are the ones whose families can't afford to make arrangements for someone to look after the kid that's being kept out of school.
In-school suspensions are generally better, although that can vary on exactly what the school does with the students that are suspended. However, even these are problematic if they are overused.
In case like yours, Meerkat, the school was defaulting to their usual punishment schemes for acting out, rather than digging deeper to find the real issue and coming up with something suited to that. So, my answer to your question would be that they are indeed meant as punishment, however your case was a textbook example of misuse of the punishment. As brickmack pointed out, punishing someone who doesn't want to be in school by keeping them out of school is utterly absurd and counter-productive. The reason for it is pure laziness - of all the possible responses to misbehaviour that exist, suspension requires by far the least amount of effort on the part of the teachers/principals of the school.