I’ve been window-shopping online for a house recently and find that almost all the pictures posted by real estate agents are wide-angle shots, sometimes extremely so. That got me wondering if there's a way to “normalize” a wide-angle photo.
Most real estate photography is done with a rectilinear (ultra-)wide angle lenses. Rectilinear lenses keep straight lines straight, but distort features away from the central view. Wide angle rectilinear lenses are unkind to people away from the center of the image. Photoshop has a magical filter called Adaptive Wide Angle which will make objects (people) look normal when shot with a wide angle lens, but straight lines will be curved. Better to make Aunt Mavis look trimmer than having straight lines. However, real estate images usually look better with straight lines being straight. You need to make compromises when trying to project 3D space on a flat projection plane.
If you can project the image on a spherical surface, you can view minimally distorted images. Disneyland had Circle-Vision 360 which used a cylindrical screen - pretty nifty at the time.
Unless they are using distorting wide-angle lenses like fisheyes, wide angle shots will be done using so-called rectilinear lenses. They project everything in a single plane in the same manner. Architecture tends to be mostly flat, so that tends to render features on a wall pretty well. Now where does wide angle distortion come in? As you look less and less straight on a wall while moving to the edge of a wide angle picture, the wall is facing you more and more obliquely: in your field of view, features on it occupy less and less space. A rectilinear lens compensates for that (there tends to be some cost in sharpness and vignetting, depending on the lens in question). If you photograph a group of cardboard cutouts of people that are front-facing (namely all parallel rather than turned towards the camera), you'll be fine. But people are not flat. They'll always have some camera-facing angles, and those are then overrepresented at the sides of the image.
If you have architectural features at different angles, like an open window, a round turret, a dihedral: those will get similarly distorted at the edges of a wide-angle photograph as people and their faces. A mural would be fine, in contrast.
So the reason you get a lot of wide-angle architectural photographs is that they are good enough for the buildings themselves in general (if not for the surroundings) and the exceptions don't outweigh the convenience of being able to show a significant amount of building without having to back off by amounts that may not be easily possible.
For the interior, the tradeoff is a bit different since the arrangement of a room is more 3D and thus looks more distorted as opposed to just the walls themselves, but backing away significantly is not an option because of the opposite walls interfering.
Try adaptive wide angle and lens filter in Photoshop, or in Lightroom, under geometry try upright/guided first though try everything. None of these are perfect but since you already have a lifetime experience looking at rooms you can eyeball it using a known object as reference. Probably not the most technical explanation, but it is going to get you to “good enough” within five minutes. From there on you decide if it’s mission accomplished or the rabbit hole.
It sounds like you're referring to 'keystoning' where lines that should be roughly parallel converge or diverge. If you're using a wide angle lens at the entrance to a room, the wall at the far end may look like a trapezoid rather than a rectangle (and we see this with our eyes when we look up at tall buildings).
This is really easy to correct although you will lose some portion of the photo on each side depending on the extent of the correct (something's gotta give!). Most of the raw editor packages have a module if you shoot in raw. I've tried a lot of them and found DxO Viewpoint to be the most powerful and it also works on non-raw files. Photoshop and GIMP allow you to perform more complex geometric transformations but you're unlikely to need to do this for basic interior shots.