The Laplace transform of a function
$\sum _{i=1}^{\infty } a_i \delta (t-\log (i))$
where $\delta (t-\log (i))$ is the Delta function (i.e Unit impulse) at time $\log(i)$
is
$\int_0^{\infty } e^{-s t} \sum _{i=1}^{\infty } a_i \delta (t-\log (i)) \,
dt$
or
$\sum _{i=1}^{\infty } a_i i^{-s}$
Your $a_i$ are $log(p)$ if $i = prime^k$ else 0, so it is the Laplace transform (of what you think) which is very closely related to Fourier transform. You might find that $\sum _{i=1}^{\infty }\frac{1}{s} a_i i^{-s} $ gives smoother results (although it then becomes a sum of $a_i$)
Given the unexplanatory tone of many number theory expositions, it is, in fact, reasonable to ask this question, I think... insofar as there is a good explanation, apart from the artifactual one.
That is, the Riemann Explicit Formula, as reformulated a bit by von Mangoldt, is an exact (not merely asymptotic) equality of a sum over primes and a sum over zeros of the zeta function. The sum over primes, at best, is not quite just $\sum_p 1$, but, perhaps most simply and most naturally, a sum of $\log p$ over prime powers $p^m$. That is, the "left-hand side" is $\sum_{m,p:p^m<T}\log p$. That is, one side is a sum over prime powers under a given bound, and the weight of the counting is $\log p$. This is an immediate and transparent artifact of the complex analysis the extracts the equality. No imagination required ... beyond the profound insight to do the thing at all... :)
The understandable confusion arises from both unexplanatory sequels that presume one knows the context, as well as from knock-off derivative work that takes whatever is found in books and papers and unthinkingly fools around with it.
Thus, the short answer is that there are compelling reasons for the appearance of this weighting scheme. Sure, it is not what the most-naive/ideal program would ask for, but it is somehow the perfectly correct answer. The more naive question of "counting primes" is somehow incorrectly posed... in the sense that one must go from the clear (with RH or not...) statement of the explicit formula to messier assertions about the naive-but-awkward formulation.
Sure, we could say that the more-sophisticated answer dodges the original question. Or, we could say that the original question was in some sense doomed, because it could not admit as simple an answer as we hoped, while the more-complicated question allowed a good answer.
Best Answer
An implementation for the function in Pari/GP:
For the exponential of Mangoldt function A014963 type: