The current behavior is very inconsistent and is in no way by design. When people expand folders with the mouse without selecting a folder first the bug doesn't manifest. But for people using the keyboard it happens all the time, because the only way to expand a folder is to select it first.