This phrase means that sometimes the bad things that happen in life can lead to good outcomes. Something negative can be a doorway to something positive. Things may seem difficult but sometimes it’s necessary for them to fall apart in order for something better to be created.