In both cases, it's some specific absence/lack. Why should I use the definite article with the former and the indefinite article with the latter?
First of all, they don't mean the same:
"Absence" always means that something is not there.
"Lack" can mean that something is absent, but can also mean a shortage, or a deficiency.
Secondly, you can use either the definite or indefinite article with both words. This example is in the Cambridge dictionary:
The business was suffering from an absence of an overall plan for moving forward.
See also this example for "lack" with the definite article:
The local residents were angry at the lack of parking spaces.
The use of either the definite or indefinite article is determined by whether or not you can point to a single lack or absence.
For example, if a shop received a delivery of cakes every day, but one day the delivery did not arrive, they might say they "have a lack of cakes". It isn't the lack, because it isn't the only lack of cakes - it may have happened before, it may happen again, and it may happen elsewhere. However, if you were speaking about that specific cake shop on that specific day, you might say "I'm annoyed about the lack* of cakes in the shop today". This is because you have identified a specific lack so the definite article is required.