First time I lived in Texas, company was Texas based, I was based in IN - I got TX UI. Second time I was still in TX, company was NY and I was based overseas. They were taking NY UI out of my paycheck so it was obvious where to apply.
It's a matter of where the company paid the UI. They first company paid the state you lived in.