When I am trying to substract two shapes where one shape is completely inside the other illustrator creates something like a group of two objects. I want to avoid this because I need shape with 'hole' in it, not only two overlapping shapes. Can't figure out what I am doing wrong.
What you are showing is basically how the pathfinder subtraction will work in this case. If you have two paths that are not joining, then it will create compound path. The blue rectangle telling the software what needs to be transparent. If you placed the blue rectangle to the croner, it would have chopped the corner off and given you a single path.
It looks like in you have isolated the paths in your example, as seen by the lighter grey and blue bar with a breadcrumb in the top left.
Isolation mode offers the ability to take greater control to amend and adjust objects.
You are not doing anything wrong. You just need to develop greater understanding of how the software operates. You have your "hole." Just exit isolation mode.