That is genuinely weird. What if Porto and Atletico had drawn their match (and still finished with 9 points somehow, just for the sake of this argument)?
They would have been ranked higher than the other two based on --- nothing but an arbitrary rule, really.
I wonder if UEFA has even thought about that (or maybe they have, ranking will be based on goal difference as it should in this case and it's just not implemented).