He was being interviewed on a general politics show
>> Mr Hancock, a former culture secretary, told BBC One's Andrew Marr Show
It's usual on these shows for the interviewer to treat the the politician as a representative of the wider government and to ask general questions as well as those about the politician's own area of responsibility.
Nothing in terms of his day job but he is known as a fan of technology (not a particularly well-informed one) so he’s likely to have an opinion on the matter. More to the point, though, the government usually nominate a minister to go round all the Sunday morning political TV shows and answer questions on whatever is in the news.
A corollary of this is that when any Cabinet minister speaks publicly, they speak on behalf of the government, and they are expected to be able to respond to general media enquiries on matters outside their specific role. They may choose not to respond substantially or to refer the enquiry to a colleague more familiar with the details, and they very often do. If they don't, it is almost certain that they are expressing an agreed Cabinet position and they just happen to be the minister doing the media rounds that day.
In any case, regardless of who you are, if you violate the terms of service of platform, you can be terminated on that platform.
The platform makes the rules, within the context of the legal systems with which it is governed by. When it comes to "free speech", that is a very tricky subject. More significantly, if even the local population cannot agree on whether certain speech should be allowed or not, then the government has no hope of regulating it either.