From the point of view of taxation, pillar 3a is primarily intended to fund your retirement, which makes it an interesting savings vehicle. You can deduct your annual premiums from your taxable income. This is permitted up to the maximum amount fixed by the federal government. The payout is then taxed once, at a separate tax rate.
As no capital is accumulated under whole life insurance, the premiums for it are attractive. If you haven’t yet utilized the maximum amount permissible under pillar 3a, you can take out whole life insurance under that pillar and benefit from the tax advantages offered.
If you don’t want your whole life insurance to end until after you reach ordinary retirement age, it makes sense to take it out under pillar 3b. This also applies if you want to use pillar 3a entirely to fund your retirement.