If a diode has capacitance, why doesn't it block the circuit after some time?
Here's a (somewhat simplified) model of a diode:



simulate this circuit &ndash; Schematic created using CircuitLab
AC can bypass the diode because of its capacitance, but there's a catch to it.
Consider just the capacitor for a moment:



simulate this circuit
Capacitors have impedance.  The impedance depends on the frequency of the AC going through the capacitor.  At 50Hz (typical AC line frequency in most of the world,) that 4pF capacitor has an impedance of around 800 megaohms.  Pretty much any load will make the 50 Hz AC disappear after the capacitor.
The capacitance of the diode and the circuit following the diode forms a high pass filter as in the second part of that last diagram.
For a 1N4148 diode with its 4 picofarad parallel capacitance and a 50 ohm load, the cutoff frequency of the filter formed by the 1N4148 is around 800 MHz. As you can see, you have to get to very high frequencies before the junction capacitance of a diode becomes a consideration.
At some frequency, the capacitance of the diode will allow more of the AC to pass than the diode operation blocks - the diode behaves more like a capacitor than a diode at that point and isn't of much use as a diode.
This is (one reason) why you don't use a 1N4001 (low power rectifier) as radio frequency detector - besides the forward voltage being too high, it also has a rather high junction capacitance that lets too much RF bypass the diode.
Bigger (higher power) diodes generally have higher junction capacitance.  Smaller diodes can be made to have very low junction capacitance - I've used some SMD parts made for over 2.5GHz operation, and I'm sure there are higher rated diodes if you look for them.