Black bars appear when a video was put into a different format than it was shot in: a cinema format inside a 16:9 video (bars at the top and bottom), a phone video inside a landscape frame (bars on the left and right), or an export that only padded a format instead of cropping it.
The bars are then part of the picture. If you crop such a video for portrait, they end up in the crop – and the platform may add its own bars around it as well.