Is it possible to get a PhD in field X with research that isn't really in field X? People obviously change their mind sometimes. So it is possible that someone starts out with a PhD in a certain field, but may want to switch to another field.

I am wondering, is it possible, or generally deemed acceptable, for someone to receive a PhD in a field, let's say political science, but for the PhD thesis to really not be political science related (e.g. it could instead be a piece of research in economics, or theoretical statistics, without any reference to political science)?

Edit: it seems that it is required to at least relate your PhD to field X. What would one do if one really did not want to relate it to X at all?
It is possible, usually, to work in another field on your thesis at least in the sciences. However, the thesis defense and dissertation will have to relate to the program you are in.

i.e. I had friends in physics PhD programs who worked in biology labs. The research had to be tied to physics for the dissertation and defense (light diffraction, computational modeling using physical concepts, etc.)

There will always be people who look down on specific disciplines, but I would think that usually it is acceptable if you can make it work.