I've flown several times pregnant virgin overseas to Fiji and jet star domestic and i had to provide my letter of fit to fly. I always got one after 20 weeks just in case and they just asked for it, took a copy I provided and checked me in. Much easier to have one to save hassles.
As to how they enforce it, it is up to their discretion. It's up to them to if they feel they need clarification on dates or health, and yes they can refuse you if they feel you are not fit and do not have a medical clearance.