It is the same reason, be it a single back test or in optimisation passes. When there is no losing trades, then the Profit Factor is undefinable (or infinite) and therefore that metric is left empty.
If however you have only losing trades then the Profit Factor is "0.00".
So, if any of entries have an empty Profit Factor, then that means the you only had winning trades for that pass (i.e. 100% win rate).