Doctors use a stethoscope on your stomach and listen to your stomach to detect any digestive issues with your stomach as well as listen to your liver and other organs that are near your stomach.
The doctor wants to make sure your digestive health is in good condition as well so that's a reason they listen to your stomach.
The doctor may also push on your stomach to see if you feel any pain and to feel any abnormalities because any abnormalities could mean something is wrong.
Or if you're experiencing any pain in your stomach or abdomen then it could mean something is wrong.
If the doctor then detects something may be wrong with the stomach or other parts of your body by listening with the stethoscope then they may order X rays to make sure nothing is wrong.