Strange behavior of opening a new file on Xcode

I have noticed that every time I open a new file (by clicking, double-clicking, or using "open quickly"), instead of opening in a new tab, there is a chance that it will replace my current tab with the new file.

For example, if I have 3 files open, my tabs look like this:

[a.swift, b.swift, c.swift]

and b.swift is my current working file. When I open d.swift, my tabs then become:

[a.swift, d.swift, c.swift]

How can I change this behavior?

Strange behavior of opening a new file on Xcode
 
 
Q