The physics engine does not allow two collider volumes to overlap. When the physics engine detects that any two or more colliders will overlap that frame the physics engine will look at the objects and analyse their speed and rotation and shape and calculate a collision. One of the major factors in this calculation is whether the colliders are static or dynamic. Static colliders are usually non-moving, parts of your scene, like the walls, the floor or the fountain in the courtyard. Dynamic colliders are things that move like the player's sphere or a car. When calculating a collision the static geometry will not be affected by the collision. But the dynamic objects will be. In our case the player's sphere is dynamic, or moving geometry, and it is bouncing off the static geometry of the cubes. Just as it bounces off the static geometry of the walls.
The physics engine can however allow the penetration or overlap of collider volumes. When it does this the physics engine still calculates the collider volumes and keeps track of the collider overlap. But it doesn't physically act on the overlapping objects, it doesn't cause a collision. We do this by making our colliders in to triggers, or trigger colliders. When we make our colliders in to a trigger, or tigger collider, we can detect the contact with that trigger through the contact with that trigger through the OnTrigger event messages.
As a performance optimisation Unity calculates all the volumes of all the static colliders in a scene and holds this information in a cache. this makes sense as static colliders shouldn't move, and this saves recalculating this information every frame.
Where we have made our mistake is by rotating our cubes. Any time we move, rotate, or scale a static collider Unity will recalculate all the static colliders again and update the static collider cache. To recalculate the cache takes resources.
We can move, rotate or scale dynamic colliders as often as we want and Unity won't recache any collider volumes. Unity expects us to move colliders. We simply need to indicate to Unity which colliders are dynamic before we move them. We do this by using the rigid body component. Any game object with a collider and a rigid body is considered dynamic. Any game object with a collider attached but no physics rigid body is expected to be static.
Standard rigid bodies are moved using physics forces. Kinematic rigid bodies are moved using their transform.