Confusion on color profiles

Hi there.
I have been posting on another forum of dt.
And i interestingly run into this:

https://darktable.fr/forum/showthread.php?tid=2366

Resuming the thread:

To me it seems that dt DOES distinguish between sRGB and RGB. I did a test with this image:

If you see a smiling face, you monitor is RGB or close, if you don’t it’s sRGB.
Now, within dt, I imported this image; when switching between color display profiles I do see the difference. Even when I export the RGB image into a JPG sRGB it makes sense, as the output is without the smiling face (just a red square).

Now, if all that things on API and Cairo and sRGB and the like was correct (and I certainly don’t have the tools to disprove that at all…), then why would I see the difference between the same image with the 2 profiles?