A PhD student without an adviser
if Y had not intention of working with me then why did they accept me?


There are many ways to unpack this: 


maybe Y did want to work with you, and then things didn't work out: funding, or mutual incompatibility, or interest changes. Stuff happens
Y could recommend you for admission as a competent student without feeling there was an implied guarantee that you'd work together. Maybe there are others in the department with similar interests. 


As has been said on this forum many times, an advisor-advisee relationship is more two-way than one might think. There has to be a mutual fit otherwise even two perfectly reasonable people with mutual interests might not click.