The stamp (along with the handwritten information) is leave-to-enter issued to a non-visa national under Paragraph 23A of the rules...
A person who is not a visa national and who is seeking leave to enter
on arrival in the United Kingdom for a period not exceeding 6 months
for a purpose for which prior entry clearance is not required under
these Rules may be granted such leave, for a period not exceeding 6
The "RRR 06 046" is the index key of the person's landing card. The landing card has notes on it and will be kept on file according to the procedures in their Operations Manual.
The next part is the term, which is 6 months. Under that are the restrictions: no work or public funds
Under that is the rounded rectangle stamp issued to anyone admitted, including those with entry clearance.
Inside the stamp one sees the IO's number, which is 7285, and the single star informs us that he is a basic Immigration Officer (as opposed to a Chief Immigration Officer, which is 3 stars, and so on).
Finally we have the date and the port of entry, Heathrow.
For your question...
If a normal leave to enter for visitors was granted, why would such a
custom stamp be issued rather than the default one?
They used this particular stamp because they needed a place to write the index to the landing card so they can retrieve it if the need arises. I am given to understand that the person was detained and his biometrics were enrolled. During that process they learned some interesting things and made some notes about it, hence the need to tie his passport to their records.
Personal observation: These things are a source of anxiety. I have seen these things for a long, long time and have consistently given this advice...
There is nothing that can be done about it and there is no way to purge it from their records. They are entitled to make a notation and if it has meaning for them, so be it. Just go about your business and deal with them in a stand up way and let them look up whatever they want. Exhibiting fret and worry will only trigger the IO's radar (quite probably what happened in this case).
You can make a Freedom of Information request and they will send back a scan of the FRONT of the landing card. All of the "juicy stuff" will not be released because it may assist the person in evading immigration controls.
It means the final canonical answer to anyone who is stressed out about something an IO wrote in their passport is to ignore it.
If you expect problems transiting UK immigration controls, get an entry clearance. It's the only way to "clear the slate" and have a stress free landing interview.