The goal of subsidized housing is to make housing more affordable for some group of people, subletting likely has the same effect so the money subsidizing the building is still going to the same thing.
Now, it might be that I shouldn't have given you the $50, or that we should have discussed giving you a business loan instead - those things are fine. There's nothing fundamentally bad about running a lemonade stand. You simply can't run a lemonade stand with charity earmarked for not-lemonade-stands.
Renting on Airbnb has the effect of subsidizing this one person's housing, not of subsidizing the community's housing.
If the goal is to use Airbnb to increase social housing opportunities, the council should do it directly, so any excess profit can be reinvested in new housing for more than just one person.