How does brazing and welding not ruin the heat treat on steel tubes?
tl;dr heating chromoly to brass-brazing temperature doesn't really change it, at all; the steel was born hot and heating it back up does nothing to it other than oxidizing the surface if you don't protect it with flux. For special proprietary exotic steel tubes heating them up may or may hurt or it may help; there is no rule. 



There is much wrong, and not-even-wrong information on this topic. If it helps, I build bicycle frames, by both welding and brazing, and I'm also a materials engineer. 

The first problem is use of the word "heat treated" which is almost meaningless, because there is an unlimited spectrum of heat treatments and material responses, and all steels are processed through heat treatments. So the question of the topic really isn't an answerable question as-posed.

I can guess the thought process behind this question, and I will try to explain the common thought process which is not really wrong but is not even wrong: 

In terms of carbon steel, a simple steel which is common, and which is sort of the "canonical" steel, if carbon content is in a range considered "high carbon", then it can be hardened by heat treatment. Then you can use it as a knife or needle or a file or saw blade or use it cut other steel. So hardenability is important technology, and it's possible to understand this without knowing much metallurgy. It is true, for such high carbon hardened steels, if you overheat a piece of hardened steel afterwards, like a knife or something, it loses its hardness and can be ruined. This is probably why people think heating up steel is somehow "bad". 

Incidentally, there is nothing magic about "red hot". Steel turning red doesn't signify any material change has taken place. It just turns red when the combination of temperature and the sensitivity of our eyes overlap. Steel turns red when it gets to 800C, but so does literally every other material. Some steels can maintain hardness at red-heat, and some will lose hardness before red-heat. The color is just the color, it doesn't mean anything is changing in the steel. 

This is all not very applicable to bicycle tubes because hardness is not an important property for bicycle tubes. Most bicycle tubes can't be hardened in the first place. Common steel frames are either chromoly or medium-carbon steel. Neither steel is particularly hardenable. So there's no real hardness to be lost here. "Hardened" is actually slang for any number of morphological transformations.

Default, basic chromoly is normally supplied in a "normalized" heat-treat condition. It can be welded with a variety of processes most notably the classic gas welding with mild steel filler. It can then be used without further heat treatment and gives very good service with no propensity for cracking if welded properly. It is also possible to weld with chromoly filler with post -heat treatment, but it's a rare process since welding with mild steel filler is so satisfactory. Chromoly literally exists because it is a supremely strong steel which is also very weldable steel. 

Any brazing process is less hot than welding. There is no problem heating chromoly to brazing temperature for any reasonable time. It doesn't become weaker. As mentioned above, the steel doesn't have any hardness to lose. Nothing is really happening to it. If you quench hot orange-hot chromoly in water it will harden to a limited extent and can cause stresses or possibly be a liability for cracking, but nobody does that. Don't get scared if you see somebody quench hot chromoly braze joints though because as long as the steel is cooled down below brazing temperature quenching is harmless. Basically as long as it's not glowing at all it's cool enough to quench in water with no harm.

Let's now talk about other steels. Within bicycle frame history, there are/were some fairly exotic steel tubes which are specifically heat treated for strength. There is crossover between hardening here and the treated steel is actually harder, hence marketing describing some tubes as "hardened" or "heat treated". In this zone, we have ventured away from classic chromoly, and all rules are gone. For those tubes, if you want to preserve the properties, you have to observe certain conditions. Otherwise, you will let out the magic and end up with something only as strong as classic chromoly, or probably worse because it might crack or something. But there is no generalization possible; it depends completely on the individual tube and manufacturer instructions.

Tubes with special heat treatment were often silver brazed with lugs. Usually, they don't get hot enough to impact heat treatment this way, so the tube is not really changed. But check the datasheet because it depends. 

Some tubes are designed with heat treatments, which, somewhat like chromoly itself, are actually designed with welding in mind. If you follow a certain welding process then the tube will end up with a certain heat-treat state after welding. An example is the famous "air hardening" Reynolds tubing which basically means you can weld it and you don't need a heat treatment oven to heat treat the whole frame afterwards; supposedly, it will return to a planned state of treatment after welding, which is supposedly/hopefully still stronger than regular chromoly. This steel exists so that Reynolds could (over-)sell their fancy steel not just to makers of lugged frames but also to fabricators who welded. But it only works if you follow the correct process, and it's mostly rot anyway since ALL steels from the cheapest department store mystery-steel to the most exotic have the SAME STIFFNESS, and almost all frames are built for stiffness, so stronger material is not as advantageous as the marketing can make it sound.