Canon 5D Mark II weirdness?
I can't give you a definitive answer, but I've have similar in my 5Ds and Mark IIs over the years and would offer the following.
These devices can be seen as fairly sophisticated computers with a sensor and a lens. Computers have glitches from time to time (imperfect code, memory locations degrade, cosmic rays...). I put the similar experiences I've had down to these glitches.
If your camera begins to exhibit some regular pattern of failure then perhaps get it fixed otherwise, if it's like mine, irregular, infrequent and no good cause can be found then reboot the device (batteries out and then replaced) and carry on.