It almost always happens to new tanks but could happen to older one also if there is a change on ammonia or bio load. Ammonia, either from liquid or fish waste will be used by nitrifying bacteria. Since the tank is not balanced yet, their number blooms because of the high level of ammonia. Once the tank reaches the balance, some of them will die off because less ammonia to feed on. The population of bacteria will adjust to the level or bioload of the tank.
This is why even in older tank, you could see temporary cloudiness. Many times happen when you just add fish hence there is a jump of bioload. Bacteria will bloom for a short time but will balance back eventually. This is what people call mini cycle.
You can help make it clear faster by feeding less also. By feeding less, fish produce less bioload and less food for bacteria.