Why can't king move to square in this scenario?

In chess rules king cannot put himself in check. There is nothing wrong. Yes black bishop is in a pin but that doesnt mean you can go to square where you can getting a check. I hope that will help

The main objective of the game is to capture your opponents king before yours is. The pin does not matter as long as your king isn't captured first. Yes, your king would be captured, and then theirs would the move after. Although, it would be considered a loss to you if not an illegal move. The player cannot put the king in check, otherwise it is a illegal move.
Hypothetically speaking - let's suppose that the rules of chess were different allowing for white king to move to h3. I don't see how black would be able to take the white king like a regular piece, resulting in white being kingless and having no way of being checkmated as a result. Let's say after white moves to h3, black decides to move its king to e7, thus freeing up its bishop to now be attacking white king. All is not lost - although this move by black would "retroactively" (in a manner of speaking) put white in check, it wouldn't be a checkmate. White king has 3 move options to get out of check, from what I can tell; it can take the bishop with its rook, it can move its king to g3, or it can move its 2nd rank pawn to g4.
In the game image below, it's white's turn to make the next move. As can be seen from the dots indicating the available squares for the king to move to, it won't allow it to move to h3. I wonder if this is a bug or flaw with the game's rules, or is this the generally accepted policy? One might argue that the king cannot move to h3 because of the black bishop, but I would counter that the black bishop actually cannot move at all in the next move since that would cause its king to be in check, thus making h3 available to the white king. Is my reasoning incorrect? If so, why?