As far as I understand it, there is no given rule for that, different countries/airports or even airlines will have different rules and traditions.
As long as there is a tag on the outside of the luggage, they will not open the case to look for a tag or name on the inside.
When there is not flight tag, they will first look for obvious tags on the outside of the case.
If the luggage is easy to open they might be more willing to check inside than when they have to break a lock.
When I saw a couple of TV shows in which the people bought whole series of cases out of the left behind luggage of an airport, those did not look as if they had been opened to check out names. The cases were offered as a speculative lot, and were auctioned off as they were, closed and with unknown content. That show was recorded somewhere in the USA, as far as I remember.
As I started, other countries and even airports may have different rules.
You will have a better chance to get your luggage back (in the very rare case it goes really missing) if it is easy to recognize and has a label on the outside or at least a message on the outside where to find contact details inside.
When your luggage does not arrive with you, get it recorded as missing, with a good description. Photos of the case will help. Most luggage that is not there when you arrive will be there with the next flight and will be delivered to your home the next day or so.
Most of the time there will still be a flight tag on it. When that is missing, they will compare the luggage there with the description you gave them of your item.
Only when those comparisons do not match or give too many possible cases to match they will look for other labels/contact details before trying to open cases, if the last is even done at all.