The dip tube could have been left out at the factory or the dip tube could have failed.
Have a plumbing contractor remove the cold water supply piping and check to see if a dip tube is installed.
If the water heater is located in a very cold area, even with a dip tube installed you will get some hot water rising out the cold water inlet because of gravity flow. Hot water rises. The water in the dip tube will eventually heat up as the dip tube is immersed in the hot water in the tank. During periods of non-use, with a cold ambient, gravity will cause the hot water to rise.