maxing out your purchasing power is a horrible idea. You are taking into account the IDEAL scenario, that is really bad planning. Whoever told you this is a novice.
You should always account for stuff like job loss, emergency maintainence on the property, unanticipated expenses etc. that can eat into your budget. If you spend everything on the mortgage you will end up using credit cards and you know where that leads! Not a good road.
People have stretched to the max and now are losing their homes because of it.