Pens should not have bubbles in them when they're new. If your pen is leaking...you might want to start a new pen and then inform your supplier. However...there are ways that you can get air into the pen vial. I've found that banging them around, in rare instances, will suck air into them from the plunger end. Why? Perhaps the rubber in the plunger has a minute scratch on its side. Also, screwing on the needle while holding the pen upside down and there is negative pressure inside the pen vial will suck air from the needle into the insulin. When I screw the needle cap onto my Solostar pen I make sure that the pen is pointed needle-end up and that I hold pressure on the plunger button to start the needle purge.
I use 5mm 31G BD pen needles. The capillary action of the needle draws up insulin as soon as it's screwed all the way on the pen vial and eliminates having to waste 2 units to clear air from the needle. If I don't see any insulin forming a droplet on the end of the needle I either give the plunger button a little pressure before I dial it up...or I put the pen vial in between my thumb and pointer finger for about 30 seconds and the heat from my hand expands the fluid producing a droplet at the tip of the needle.
As far as the (multiple) little bubbles that cling along side the pen vial, I've only come across that once in the last 20 Solostar pens that I've used. I'm not sure why that happens. What I did was just ignore the bubbles because a pen needle is different from a syringe. Syringe needles don't extend into the syringe vial like pen needles do. With a syringe you have to purge the air by pushing the air out of the syringe into the insulin vial. You can't do that with a insulin pen, there's no way to recoup the insulin needed to purge that air.
What a pen needle does is it extends itself into the pen vial so that any air that's in the vial clings to the side of the vial and can't get into the entrance of the needle. You'll notice that when the pen is empty that there's still about 5 to 7 units of insulin still in the pen vial because the pen plunger doesn't completely bottom out like a syringe does.
As to getting a small bubble of air into your subcutaneous layer...it's not really a danger. If for some reason that happens your body will absorb the air, eventually. Getting air into a vein is the concern...and even then, it's a tossup. I've heard of junkies trying to kill themselves by injecting air into their veins and nothing happened.