Why do particles of a real gas have intrinsic random motion even before to collide with each other when the gas is heated? Why do particles of a real gas have intrinsic random motion (before to collide with each other when the gas is heated)?
 A: The dynamical origin of the random motion observed in classical interacting systems is the chaotic behavior of almost every Hamiltonian system characterized by a strong short-range repulsion.
A distinctive feature of chaotic dynamics is the exponential divergence of near trajectories in the phase space. This implies that even if one starts with an ordered dynamical state, after a very short time, every original correlation has disappeared, leaving a random-like behavior.
Notice that this is a result of Classical Mechanics. There is no quantum effect behind it. Of course, Classical Mechanics is deterministic. However, the practical possibility of predicting the future behavior of a chaotic system is limited to very short times unless initial data are exactly known (a practical impossibility). In the presence of any non-zero uncertainty on the initial conditions, the resulting motion is practically unpredictable and better described as random.
A: It's a model. The random motion is an assumption of the model. If it's not a decent approximation, the model won't reflect the physics.
A: 
Why do particles in an ideal gas have random motion even before to collide with each other

They don’t. If you create an ideal gas without allowing collisions—e.g., by evaporating it very slowly from condensed matter in a very large region of vacuum—then the motion isn’t random; it’s away from the condensed-matter surface.
But within a container, collisions are inevitable, ultimately leading to random motion because the walls aren’t perfect planes. We see this in simulations and from consistency of observed results with corresponding models.
A: The question as it stands is unclear, but from comments added by the user Priscilla to other answers, it seems the question concerns something like an interstellar gas of, say, helium, where there is no "container" whose walls could provide collisions.
So first I will state the question I am about to answer. Here it is:
"In the case of a gas with no obvious container, such as an interstellar gas of, say, helium, do the atoms have random motions, and if so then how did those random motions come about?"
The answer is that such clouds usually do have random atomic motions, but they need not be entirely random. We do not need quantum physics to account for the random element here. The random motions come from whatever was the history of those atoms and consequently the forces on them. That history might go all the way back to the plasma in the early universe, for example, or it might include some stellar process. But in any case on the long timescale of interstellar processes even if the gas was not randomized to begin with, it will eventually randomize through collisions (including both the short-range and the long-range interactions between the atoms). Also, if energy is supplied to the cloud then that energy itself has some form which may involve random motion. For example, thermal radiation.
The randomizing effect of collisions is an example of the type of process known as "chaos", which involves exponentially growing differences between trajectories during some time interval.
If the question concerns the more philosophical point about whether things in classical physics are ever truly random, then that is a different question.
A: 
Why do particles in an ideal gas have intrinsic random motion even before to collide with each other when the gas is heated?

You state it yourself:

The molecules are constantly moving in random directions with a distribution of speeds

In classical thermodynamics any collection of particles is connected with  heat:

Heat may be defined as energy in transit from a high temperature object to a lower temperature object. An object does not possess "heat"; the appropriate term for the microscopic energy in an object is internal energy. The internal energy may be increased by transferring energy to the object from a higher temperature (hotter) object - this is properly called heating.

....

Internal energy is defined as the energy associated with the random, disordered motion of molecules.

So any collection of atoms, in your question a gas, will have already intrinsic random motion and be colliding randomly with each other if it is above zero kelvin temperature.
When the gas is heated further, that internal energy is increased
The intrinsic random motion (kinetic energy) in an interstellar gas comes from the original energy which any cosmological model has to assign to the universe. See the process in the Big bang model.
A: There's a bunch of great answers already. Let me try another picture. This time focusing on the cosmological scale you seem to be interested in based on some comments.
Let's imagine there are stationary particles of hydrogen that just got created in the middle of perfect vacuum at some random position. This is our starting situation.
These particles interact with each other - let's start with just gravity, and let's keep it to Newtonian gravity at that (in fact, it's a scenario that's great for intuitively deriving general relativity, but that'd take a while :)). Each particle feels a slight gravitational attraction from every other particle, which will impart momentum to each of them. Of course, the average momentum is zero - in every pair of interactions, both particles gain the same amount of momentum in opposite directions. It's clear enough that the net result is that the gas will start collapsing - the particles will be moving at increasing velocities towards the common mass centre of the whole "cloud". The mere fact that there are particles with separation in space is enough for this.
Of course, if you take a snapshot of the whole system at any time, you can run the same equations backwards, and you'll get back to the starting condition. There is no randomness here. As the particles get closer, the force acting upon them  will grow stronger; but since there's more than two particles, they will not hit each other - the deflection from the other particles will be enough to instead allow extremely close (and fast!) approaches that will eject them essentially at random and in random directions.
This is not true randomness - you can still trace the paths backwards to the original magical stationary condition. But it's clearly becoming harder to see that there even was such an original position. Absent any other interactions, you'll get a churning cloud of particles that will behave in all ways like a similar cloud that was created with random motion in the first place - except for this one thing, where if you run all those equations perfectly backwards, you'll get back to a stationary configuration - for an instant. For bonus fun points, if you keep going backwards, you will see the exact same evolution as in the forward direction.
Of course, in reality, gravity (Newtonian or otherwise) isn't good enough for a decent model of the behaviour of interstellar gases. Electromagnetism is rather important as well. Even if interstellar gas was neutral (most of it is actually a plasma), as the particles approach each other, the mutual electrostatic repulsion will grow stronger - the charge cancellation is not perfect, and the slight difference in the distribution of charge is enough to manifest as a very real force. Things get further complicated when you account for electromagnetic radiation. And then you realize that you're modelling a chaotic system, and tiny variations or imprecisions will give you vastly different results.
At every point, you could run the equations backwards and get back to the start. But only very rarely would you be in a conversation where there would be any distinction between "random motion" and "just following the equations of motion to get this particular configuration of particle momenta". Appearing random is the common thing - it's the order that's interesting.
There are many sources of both apparent and "true" randomness. Each dominate at different scales, in different situations. But when we talk about particles in a gas being in random motion, we're not talking about "true" randomness. Just "it's impractical and useless to consider any particular configuration of momenta, so we might as well consider particles in random motion following a particular distribution of momenta". Having more than two particles is more than enough to introduce enough apparent randomness to be virtually indistinguishable from any sources of "true" randomness (like, say, nuclear decay).
Oh well. Things are complicated? :D This is still just a tiny section of everything that happens in reality, or even when trying to simulate a naïve kinetic theory of gases model. But I hope it's enough to show that the end result of having a gas made up of particles with essentially random momenta is not weird - and it's a good starting point for considering any particular collection of gas particles. This goes double when you're talking about gas in a thermal equilibrium - that must have gone through this "randomization" anyway.
To sum it up - gas particles interact with each other too, not just with the walls of a container. If they start stationary with respect to one another (let's ignore GR again), they will not stay that way.
A: At molecular scales and below, motion is fundamentally uncertain. The uncertainty in position times uncertainty in momentum is given by planks constant (a very small number). Understand that this is not a measurement error, we are saying that the wavefunction of fundamental particles is such that it is impossible to say for certain where they actually are. This effect gets more and more dramatic for smaller particles such as electrons, which can't be said to be particles at all.
