Mouse RayCasting works differently

So i have a simple scene: Cube and a plane. I’ve created script, attacked to a cube with OnMouseDown. But it worked half of the time. I wanted to find out wtf is going on. So i created simple thing to detect what im clicking at.

if (Input.GetMouseButtonDown (0)) { 
	RaycastHit hit; 
	Ray ray = Camera.main.ScreenPointToRay (Input.mousePosition); 
	if (Physics.Raycast (ray, out hit, 100.0f)) { 
		Debug.Log(hit.transform.name);
	}
}

Launched game, aimed at Cube, picked my mouse from mousepad and started clicking. Even tho there’r absolutely no movement of any object on scene, no movement of mouse - 50% of time mouseClick is on Cube, 50% is on Plane behind the Cube.
???
UPD. It’s not 50/50, it’s more like 80/20, plane behind the cube is winning.

Okay, so i kind of fixed that. For ppl who followed question: what was happening - i manually set position of the cube in air, even though it was a physical object. Freezing object ( rigidbody constraints → freezeAll) solved the problem. But im not fully understand why was that a problem, cause object was not moving anyways as well as it’s collider. If somebody can explain - thanks in advance.