Are you saying that smartphones used to have heart rate monitors but they were removed to force people to buy smart watches?
The problem is, it was basically useless. The main use case for heart rate monitoring is continuously throughout the day/night, or during exercise. A watch is very good at this. An optical sensor on the back of your phone is not.
Periodically checking your heart rate by holding your phone in a specific way is not a useful feature for that many people.
Turns out, when you have a known luminance, white balance, and frame-rate... the DSP to grab heart rate from a finger is trivial.
But on the Galaxy S7 that I think is being alluded to here, it was definitely a separate sensor -- a MAX86902, IIRC.