It really depends. If your filling is a thick custard and the cake doesn't absorb it, there is no need.
However, this is a classic pastry technique to keep the original consistency of pie crusts, pastries, and cakes. Often, they are brushed with a thin layer of melted apricot jam as a sealant. Of course you could use other flavors or even buttercream.
A great example would be a fresh berry pie with a pre-baked shell. All of those berries and sugar might make the pie shell soggy. But if you seal it first, it is nice and crisp.
I do the same to cakes if I want a macerated berry filling.