In epidemiology, certain subgroups, such as minorities or individuals with rare conditions, may be underrepresented in a random sample. This underrepresentation can lead to biased results and limit the generalizability of the findings. Oversampling helps to enhance the statistical power and accuracy when studying these groups.