The bacteria do live in a bio-film. It is how they attach to solid surfaces. The bacteria are not free swimming to any real extent. So they begin attaching ASAP. Once they attach, they multiply. However, while the biofilm can protect the inhabitants from some level of chloramination, antibiotics and other harmful things, it does not make them bullet proof. If you expose the biofilm to a strong enough amount for enough time, it will kill them. While one antibiotic may not harm them, another one can.
There is no need to rinse out the media in a tank being cycled, so there is no risk as the bacteria are initially colonizing. If your tank is cycled, the bacteria are ensconsed in the biofilm. What happens over the next few month is that all sorts of other bacteria begin building up in the biofilm as well. So the biofilm expands. And this presents one potential danger. Biofilms can increase in size by gaining area and they can increase by gaining depth (thickness). If a biofilm grows too thick instead of spreading out, it is at risk of becoming detached or having pieces broken off by water flow. One of the benefits of bio-wheels for hosting bacteria is that the rotational motion encourages the biofilms to grow by spreading laterally rather than up which mitigates the potential shearing incidents.
The biofilm is not so much a protective layer as it is a giant home, The bacteria are all inside it. And there is also a layering effect. Where various types of bacteria are found within the bio-film is not random. The ammonia oxidizers are near the surface and the nitrite bacteria are in close proximity to them. deeper inside the biofilm there will eventually be denitrifiers as there will be some anaerobic regions deeper inside. Here is a good table which explains what the biofilms do. You can ignore the third column as it get more technical than we need to know.
from
http/www.researchgate.net/publication/45440998_The_biofilm_matrix/file/d912f50fa50a170c50.pdf
The other thing to realize here is the bacterial biofilms are not limited to living in filter media. They will be found wherever in a tank they can get a constant supply of nutrients and oxygen etc. They are in the substrate, they are on the decor, they are on the live plants.
If you want to learn more about these biofilms this is a decent paper:
Bacterial Adhesion: Seen Any Good Biofilms Lately?
http/www.ncbi.nlm.nih.gov/pmc/articles/PMC118072/
Here is an interesting factoid re the nitrifying bacteria. They are not 100% attached an immobile. Some number will be motile, meaning they can move voluntarily. How many are mobile is directly related to the nitrogen content in the water. After all, it forms the base for the nitrogen cycle. When nitrogen is in good supply, the fewest numbers are motile (maybe 10%). But if nitrogen becomes scare, more of them are "born" motile because they will need try to move someplace else where there may be better conditions. The rest of them are going to go dormant if they must. Basically, in hard times some hibernate and some move off seeking better pastures. Nature is pretty clever in how it works things out.