OK, we have some pretty good answers for how 700c became popular, but explaining why 27" has almost completely gone extinct requires a little more.
The high end roadies wanted 700c because of the tubular/Euro bike connection, but the low end buyers didn't really care. Then MOUNTAIN BIKES became the standard low-end purchase and there essentially WERE no low end road bikes in the shops and no 27" wheels. The only people buying road bikes were the high end folks.
Then road biking became popular again and people started buying entry level road bikes and the makers saw no reason to spec 27" wheels.