The breaker box and wiring to your house can actually wear out over time.
If you own an older home, you start to realize that it is merely the sum of a number of expensive parts that are an the verge of wearing out. Buildings are just like cars or people - they have a design life. Some last longer then others, but in the end, they either need to be entirely overhauled or just scrapped, so you can start over.
If you live in homes for more than 30 years, you understand this. Having owned a number of homes and rental properties, the inevitable repairs and remodeling are expected. However, to a lot of young people, particularly first-time buyers, the need to repair, upgrade, overhaul, and tear down seem mysterious. In our condo development, there was a lot of rending of garments and tearing of hair when special assessments were needed to repair balconies that were falling off the buildings. Buildings last forever, right? Or at least it seems that way when you are 25.
I have written before about your sewer line, your water line, your service drop, replacement windows, various appliances, plumbing repairs, your HVAC system, your toilet (and toilet flange), your disposal, as well as a host of other small things. When you buy your first house, don't be in a hurry to run out to Home Depot to buy things for it like solar-powered lawn lights or other tchotchke - you will be forced to buy necessary things in short order.
And tearing out perfectly good kitchens because you don't like the color of the appliances is just idiotic. But we've seen people do this - throwing away five-year-old appliances and nice cabinets, just so they can have the stainless steel their neighbors have. Resist the urge to buy a cement lawn donkey - there are other things you will need to spend on.
Today it is our main breaker box, so I am typing this on a laptop under battery power. I had better type fast! As I noted before, we had something called a Federal Pacific "Stab-Lock" breaker panel in our home. It has been known to start fires in the home, as the breakers would not break under a short-circuit condition (but would break under overload) and thus cause the wiring to heat up until it started a fire, burning your house down.
In order to sell the house someday, we have to replace this panel - and arguably the people who remodeled this house 13 years ago should have - but didn't. When the time comes to put the home on the market, the panel would have to be replaced. A simple home inspection would spike the sale based on the panel. As I noted in an earlier posting, it pays to always have your home ready for sale, as you never know when you have to sell it - due to a job loss, or illness, or whatever.
This is not to say you should stage your home like a real estate photo shoot, or have a perpetual "for sale" sign in the front yard, only that you should not let broken things accumulate and repairs linger, as if you have to sell someday (and you will - on the average of every 5-10 years or so) it will be massively inconvenient for you to have to line up contractors on a moments notice to get all these repairs done.
For the most part, wiring doesn't "wear out" over time - at least not modern wiring. If you have a modern Square-D panel with modern copper "Romex" wiring, you are probably set for years if not decades. However, there are a lot of older homes with antiquated wiring systems still out there that need upgrading, as older style wire insulation can crack and short, and outmoded electrical panels can cause fires.
You don't see them so much today, but in my lifetime, I have owned or rented homes with knob-and-tube wiring or old-style fuse boxes, complete with screw-in fuses. Our local hardware store in Alexandria sold screw-in fuses, as some of the residents in our neighborhood still had these vintage 1949 electrical systems. Back in the day, fuses would blow, and you'd have to go "mend a fuse" as Paul McCartney would say, by unscrewing it and screwing in a new one.
Sadly, sometimes people would "fix" a broken fuse by screwing in a larger one because the correct fuse kept blowing (because the circuit was overloaded) or worse yet, screwing a penny into the fuse socket completely defeating the system.
By the way, what do fuses and circuit breakers do, anyway? Seems like an obvious question, but many people really don't know. In any electrical circuit, there is always a weak point that will burn out if the circuit is overloaded. If there is a dead short somewhere, for example, whatever wire in the circuit is thinnest will start to overheat and get hot - eventually melting, but not before potentially setting fire to something. A fuse is just a thinned piece of material designed to melt above a certain amperage. The rest of the circuit should be designed to handled more amperage than the fuse. Thus, rather than your house wiring turning red hot, melting the insulation and setting fire to a 2x4, the fuse simply melts and the power goes off. If you blow a fuse, you should figure out why, before replacing it - and certainly not replacing it with a larger fuse (30 amp versus 20 amp) - or you'll just make the wiring in your house the new "fuse" that will melt the next time around.
Circuit breakers work the same way, but instead of melting, they measure current through a circuit and "trip" magnetically when a certain amperage is reached. Again, the circuit breaker should be sized so it is the weakest link in the system. Yet a lot of amateur electricians will put 15 amp wiring (14 ga) in a 20 Amp circuit (which should be 12 ga) - effectively making the wiring into one long fuse. And this is why having a home inspection is a good idea, as a good home inspector can spot these boners before they burn your house down.
Then there are electrical upgrades to consider. My house in Chittenango had 60-amp service, albeit through a new breaker box (the previous owner had replaced the balky fuse box as part of an upgrade). The furnace was gas, the hot water heater was gas, the stove was gas, and even the dryer was gas. There was little in the way of electrical loads in the house, other than the refrigerator. As a result, 60 amps was more than enough for lighting and such.
Today, most houses have 200 Amp service or better. Even small condos have 100 Amps. And many mega-houses today are going to 400 Amps. The simple reason is air conditioning - along with electric dryers, electric hot water heaters, heat pumps, electric ranges, and so forth. If you want to install central A/C or a heat pump, you are going to need more power, if the home was not designed for such things. When I grew up in New York, Connecticut, and Illinois, few people had air conditioning in their homes - even in Old Greenwich or Lake Forest! We worried more about heating back then, as it rarely got hot in the summers. All that has changed.
Odds are, the house you live in today has adequate wiring, if it was built in the last 20-30 years. Like I said, I've seen otherwise, but perhaps that is because I am older and have lived in older homes back in the 1970's. Back then, a 40-year-old home was built in the 1930's - when knob-and-tube and fuse boxes were still in vogue. I've seen houses with the "wiring sampler" of new romex, older metallic sheathed, and even knob-and-tube - the latter of which should be removed and replaced right away. The problem with older types of wiring is that as they age, the rubber or fabric used as insulator tends to dry out and crack, exposing the bare wires, which can short out.
The other problem with older homes is poorly done amateur repairs and additions, where circuits are overloaded or patched or added onto. Ideally, there should be no more than one wire to each breaker in the electric box. When your electrician takes off the panel cover and sees two, three, or four wires to a breaker, something isn't right.
And speaking of electrician, this is something you don't want to do yourself. Even with an Electrical Engineering degree, I hired this one out (after doing my own power drop) as we have a local guy who can do the work for not a lot more than I would pay for the materials (as a contractor, he pays less than I do) and he knows the electrical codes and practices better than I do. As an Electrical Engineer, I learned how microstructures are formed to make semiconductor circuits. We were not trained on how to wire houses. A little knowledge can be a dangerous thing! This is not to say I have never replaced a breaker box, only that at this point in my life, I really don't feel like doing this.
The local electrician charges less than $1000 to do this upgrade, which is very reasonable. In metropolitan areas, they might charge more. And in some instances, it may take overnight, which means your refrigerator may be without power for a long time - something to consider before they start ripping things out.
Of course, one problem with these sorts of things is that some electricians will want to upgrade other systems as well - installing a new meter box, a new master-breaker, and maybe even new main power leads. It is possible that once you start digging into this kind of thing you end up with a cascade of repairs.
Owning a home - a house - is just owning a thing. It is a complex thing made of a number of parts that wear out over time. If you are looking at a home that is more than 20-30 years old, odds are a lot of these things (roofs, appliances, HVAC, plumbing, wiring, etc.) have already been replaced or are ready to be replaced. Factor these repairs into the cost of home ownership. If the basic costs of ownership - mortgage, utilities, taxes, etc. - are already higher than the cost of renting, then ask yourself why you want to own as opposed to renting. Sadly, so many people get caught up in this "dream of home ownership" that they overlook the cost, in terms of monthly cash flow and overall transaction costs.
Budget and set aside monies for every system in your house, based on how old it is, how long you expect it to last, and how much it will cost to replace. There really is no such thing as an "unexpected" home repair, despite what the news media likes to sell you in some sob-story.