The first and third photos exhibit barrel distortion which is normally to be expected at 18mm when using an 18-55mm zoom lens. Software correction can help, but for best results you need software that includes a custom profile of that particular lens on that particular camera. There are also some perspective issues in shots #1 and 3, which are related to the camera position relative to the top and bottom of the cabinet.
The second photo demonstrates little, if any distortion. The reason the top of the cabinet appears wider than the bottom is one of perspective, and is due to your shooting position being closer to the top of the cabinet than to the bottom. This is further emphasized because the camera was tilted to the right enough that the right edge of the cabinet looks straight compared to the edge of the frame and the left edge of the cabinet appears tilted.
An extreme example of this effect would be a picture taken while standing between the rails of a train track. Even though the rails are a constant distance apart, they look closer and closer together the further away they are from the camera. If the image is composed so that one rail is "straight", the other rail looks very tilted.