Knowing that Yukio is actually crazy about Komari, you can see where her seemingly strange actions make sense from her perspective. She just never explains herself (well except once late in the series).
Like here, the reason she acts cold and distances herself from Komari after this incident is to protect her.