Actually, that's not strictly true. With a great many defensive Pokemon the best way to make a spread is break out a damage calculator like the ones in the first post of this thread and calculate a variety of different attacks against different EV Spreads to see what EVs you need to get the damage you want. For example, say you want a Forretress that cannot be 3HKO'd by +1 Dragonite Outrage and is not 2HKO'd by Specs Latios Draco Meteor. The first step is generally to maximise HP, because for the vast majority of Pokemon this is much more efficient than splitting EVs between the defensive stats; only Pokemon that have gigantic HP relative to their defenses see any benefit in not using full HP. I should not that a lot of people like to use 248 HP EVs anywhere this would give an odd HP stat, because odd HP reduces damage from Stealth Rock. Additionally, on a Pokemon with Leftovers, a number which is a multiple of 16 +1 will yield maximum Leftovers recovery - this is usually called a Leftovers number, and is not strictly necessary, but I believe optimal. (correct me if I'm wrong here, I think that's how you work out a Leftovers number...) With 248 EVs in HP, we have 260 usable EVs left for Forrestress' defenses, assuming we do not need to invest a little in special attack for HP Ice Forry because we are not using HP Ice. Forretress will have Leftovers, so after it has switched into Stealth Rock, it must take less than ~33% from Dragonite's Outrage to ensure that Leftovers will heal it into survival range. Against 248/0 Forry, this Outrage does 34-40%, so we must invest some defense EVs. With 248/252 neutral natured Forretress, Outrage tops out at 34% - this means we will need a defense-boosting nature to achieve the stat we want. With 248 HP, 176 Def and a defense boosting nature, Dragonite can do a maximum of 32.6% with Choice Band Outrage - not enough to 3HKO us, so this is the number we want. This leaves 84 EVs for Special Defense. Specs Latios Draco Meteor does 64-72% against 248/84 Forretress, so unfortunately we cannot avoid a 2HKO from this attack as we originally wished to. However, this spread does narrowly avoid a 2HKO from Dragon Pulse most of the time, taking a maximum of 49%. Therefore, a spread of 248/176/84 with a Relaxed nature seems to be the optimum is Forretress is asked to take on these two Pokemon.
That was just an example but the concept is relatively similar with any defensive Pokemon; Find an attack you want to live X hits from, play around with a damage calculator until you find a spread that does that, have a look at things you can try to do with the remaining EVs and eventually work out the best spread for your needs.