Just because it isn't illegal doesn't mean it isn't wrong.
It actually might be illegal, too (theft of services), although I doubt anyone has ever been prosecuted for it. The airline could probably sue you for civil damages, but they are more likely to try to collect the fare or do something to your mileage account (cheaper for them), if you are caught.