Just to emphasize, $t/\lfloor \ln t-1/2 \rfloor$ is not, in any ordinary sense, as good an approximation to $\pi(t)$ as $t/(\ln t-1)$, let alone as good as $\int_e^t dx/\ln x$. It is simply, like a stopped clock, an approximation which is occasionally exactly right.

I'll define $R(u)$ to mean the closest integer to $u$, so your proposed approximation is $t/R(\ln t -1)$. Set $Li(t) = \int_e^t \frac{dx}{\ln x}$ (where the lower bound of the integral is set is irrelevant.) Then $\pi(t) - Li(t)$ is eventually smaller than $t/(\ln t)^N$ for any $N$. Integrating by parts shows that
$$Li(t) = \frac{t}{\ln t} + \frac{t}{(\ln t)^2} + \frac{2 t}{(\ln t)^3} + \frac{3! t}{(\ln t)^3} + \frac{4! t}{(\ln t)^4} + \cdots $$
where $\cdots$ is meant in the sense of asymtotic series: If you stop the sum at the $N$-th term, the error will be bounded by a multiple of the $(N+1)$-st term. We have
$$\frac{t}{\ln t - 1} = \frac{t}{\ln t} \frac{1}{1-1/\ln t} = \frac{t}{\ln t} + \frac{t}{(\ln t)^2} + \frac{t}{(\ln t)^3} + \frac{t}{(\ln t)^4} + \cdots$$
So $t/(\ln t -1)$ is pretty good, matching the first two terms of the asymptotic series. By comparison, $t/R(\ln t -1) = t/(\ln t - 1 + \theta)$, where $\theta$ oscillates between $\pm 1/2$. So $t/R(\ln t -1) = t/\ln t + (1-\theta) t/(\ln t)^2+\cdots$, only matching the first term of the series.

To emphasize the difference, the following figure plots
$$Li(t)- \pi(t) \ \mbox{(green)} \quad \frac{t}{\ln t -1} - \pi(t) \ \mbox{(blue)} \quad \frac{t}{R(\ln t -1)} - \pi(t) \ \mbox{(red)}$$
for $t$ between $10^4$ and $10^6$.

You can see that green is a little bit better than blue and both are in general far better than red, although red is occasionally exactly right.