Building endurance, increasing speed, improving your tolerance for anaerobic training, or practicing racing or pacing strategies, are worthwhile secondary objectives which you should expect from your intervals. But they are secondary. Repeats can technically be any distance from 25 yards to 800 yards or more, but for stroke improvement, which is the name of our game, shorter ones are nearly always better. While longer repeats help develop endurance and pace sense, they generally undermine speed and technique. For more speed, choose fewer, faster repeats, and more rest.
Higher intensity develops more speed and anaerobic fitness.
When you do, watch out. A short rest interval doesn't allow enough recovery for an all-out push. Not at all. The variety is limitless. You can drill, drill-swim, or just swim.