Why doesn't Relentless Assault work if it is not cast during a main phase?
Reconsider rule 500.8, specifically 


  They do this by adding the phases directly after the specified phase.  


Relentless Assault adds an additional combat phase after this main phase. 

As the spell resolves, it will untap creatures that have attacked during this turn. Then it will attempt to add an additional combat phase, followed by another main phase, after this main phase. If the game isn't in a main phase, it is impossible to complete the additions.