I wonder why because my road bike has crank and rear gear on right side so I thought they might lean on right side?
The answer - of course - is that the bicycle doesn't balance at all. Try and stand one up if you can, you'll be there a long time.
However, when you are riding the bike, you can dynamically account for unbalanced loads using the steering and your body position. It's easy to ride a bike with a pannier bag on just one side weighing several kilos - significantly more than the drivetrain components! - and still be able to hold a straight line or maintain proper control.
Thanks to @WillVousden for pointing out that a "normal" bike (without a rider) will be able to roll eg down a hill, sometimes for quite a long time, until it falls over due to veering off course, slowing down too much or hitting an obstruction (including a rough surface). The drivetrain doesn't have much effect on the weight distribution of the bike in this scenario as (mentioned in other comments) the drivetrain components are all quite close to the centreline and even the combined weight of them is not enough to cause the bike to lean by a noticeable amount, though there is probably a calculable effect.
There are many parts to the balance of a bicycle.
First, the weight of the Derailleurs, Cogs etc. is fairly small compared to the total weight of the bike, and a lot more so compared to the combined weight of bike, driver and baggage. It's also still pretty close to the center pane, meaning there's little force and a short lever, resulting in very little "unbalancing momentum".
Then, balance of a bicycle is dynamic and not static. You might notice, when driving very slowly, that you are not going in a straight line, but in long s-shaped lines (how do you say that in English?). That means, when you start leaning to the right, you automatically steer to the right, and vice versa. As a result, on average you'll have the center of mass above the pivot axle (which is the theoretical line drawn between the contact points of your wheels with the road).
Additionally, as you go faster, you get gyroscopic stability from the rotating wheels. Just like a spinning top, any spinning mass has a tendency to maintain its attitude, i.e. for your bicycle wheels, a desire to stay upright. You can test that easily, by holding a wheel by its axle and changing its direction or attitude. then, have someone spin it up, and try the same changes in attitude. You will notice it to be much harder the faster the wheel spins, because of the gyroscopic stability.
It works similarly than steering a bike: you angle the bike away from the upright position, although only very slightly in contrast to steering where you angle a lot.
A bike that is steered needs the center of mass far left or right to the tire contact pacth centerline. You do that by countersteering, which moves the wheels of the bike to the right for example. If the center of mass is traveling straight and wheels are moving to right, the center of mass will soon be left to the tire contact patch centerline, allowing you to initiate a left turn.
A bike that is riding straight needs the center of mass directly above the tire contact patch centerline. If there's a heavy pannier, let's say a fully loaded Ortlieb Back Roller (9 kg) on one side of the bike only, you just sit straight on the saddle and slightly angle the bike in such a manner that both you the rider, and the bike underneat the rider is slightly angled to the other side. This brings the center of mass above the tire contact patch centerline.
It doesn't require much angling. The bike is presumably at least 10 kg and the rider at least 60 kg. This makes 70 kg total angling capacity to counter the 9 kg load.
Those parts are not far from centre, and light compared to you (the rider) or the mass of the whole system.
While riding your bike and steering + shifting your weight side to side to maintain balance, you probably need to lean a tiny fraction of a degree to the left (on average) for the bike+rider center of mass to be centred above the contact patches of your tires.
(It doesn't have to mean the bike frame is leaning at all, though, if your weight in the saddle is slightly to one side.)
Any actual change in direction of travel requires having the centre of mass inside the turn radius of the wheels, in which case this slightly off centre mass will require leaning a fraction of a degree more or less.
You'll never notice a fraction of a degree when riding; it still feels like the bike is upright. (Unless it's not, like if you stand on the left pedal and let the bike lean left, against the inside of your left leg.)
You could still balance a bike with a 5 kg weight welded to stick out maybe half a meter to one side of the bike, where it would have a significant effect on balance. (or 10 pounds, 1 or even 2 feet if you prefer non-metric units). Rocking the bike noticeably to the left would bring the weight in closer to the centreline, but the more noticeable effect. But most of what you'd do to balance is probably stand up on the pedals so you could shift your bodyweight to the opposite side a bit. You being much heavier than 5 kg wouldn't need to go nearly as far out to the side.
This thought experiment hopefully demonstrates that it's possible to balance an uneven bike, with the amount of asymmetry determining the amount of compensation required. With an actual bike that's not intentionally unbalanced, it's pretty easy to see that the amount of compensation is small enough to not be noticeable.
You may even have ridden with a bag hanging from one handlebar, which is extra bad because it also affects steering directly, as well as sticking out to the side.
Let's consider a car - they are not balanced but do not fall over. That's because the Center of Mass is between two wheels and two axles.
Most vehicles are front-heavy, and while the engine is central, the driver is always on one side which adds ~100 kg. A front-seat passenger is optional so may or may not counterbalance.
Returning to your question about bikes, the center of mass is much higher up whether the bike is ridden or not. And the contact patch is much narrower, so it is easy for the COM to not be over the the contact patch, and bike falls sideways.
Notice the bike does not fall forwards or backwards over it's wheels, because the COM is between the wheels.