Apart from nominal customs checks another factor in delays could be the differing VAT rates between Spain and UK - 21% as opposed to 20% - and they are entitled to charge the difference.
Plain letters with obviously only paper inside should not be a problem but
anything containing an object - even just a key - will be liable to scrutiny.
Within the EU goods to the value of €45 are exempt from additional VAT but unless stated on the package then without inspection they have no way of knowing the value of anything and whatever form an inspection takes it inevitably needs human input which in turn means a potential for delays.
Even though not specifically required it's never a bad idea to indicate on a package it's contents and value, it certainly can't do any harm.
Of course things can only possibly get worse after Brexit !