Trying to stay as close to your definitions as possible, one may actually want to avoid Plot because it will have trouble when the number of discontinuities is too large to be properly resolved for a given choice of PlotPoints. Instead, as you already started out doing, one can use a list plot. But to get lines, you should use ListLinePlot and define the corners of the step functions:
n = 50;
a8 = Table[Sum[Log[Prime[i]], {i, 1, j}], {j, 1, n}];
a7 = Table[Prime[i], {i, 1, 50}];
a9 = Transpose[{a7, a8}];
a10 = Transpose[{Rest[a7], Most[a8]}];
ListLinePlot[Riffle[a9, a10]]

This guarantees all steps to be nicely rectangular. Here, the number of jumps is given by n = 50.
What I did is to simplify your definition of a9 without changing it, and then adding a list a10 where all the x-values are shifted to the right in order to define the right side of each horizontal segment. These two lists a9 and a10 are then combined with Riffle so that elements from each list alternate, giving the desired line.
You can increase n without having to worry about the PlotPoints option in Plot.