You are of course correct. The Spartans were fighting for their freedom and the freedom of Greece while at the same time being some of the most brutal masters of their own slaves in history.
The helots revolted several times and even came close to winning their own freedom which says a lot considering they were going up against the best warriors the world has ever known.
I admire the stand of the 300 against overwhelming odds, but when you look closely at Spartan society, it was absolutely repellent.