The issues with the graph plotted by the code are mainly as follows:
At the boundary points of the piecewise intervals, the graph is not a vertical line segment but rather has no image at all. See the parts circled in red in the figure above.
The right endpoint of each interval is not included; the graph should use an open circle at that point to indicate this, as shown by the yellow circles in the figure. However, it does not.
How should the code be modified so that the generated graph matches the correct, normal function graph shown above?
I would suggest the option Exclusions, but it does not work with your style of defining functions. Do real Piecewise definitions instead, which are built for symbolic computation. As for the open circles, you can do them only manually, I suspect.
It puts them at ALL the right end points, whether they deserve an open dot or not. You’ll have to manually put some conditions in, if you want to restrict which segments get dots (e.g, the last one on the right should not get one if x were to go up to 4.5).
Or you could remove the last dot with the following:
You can draw the vertical segments manually using Line and mark open/closed endpoints with Point inside a Graphics overlay. Show[Plot[...], Graphics[{...}]] gives you full control over those boundary details.