The 4 nights is a 15% discount off the standard rate of $321.00.
The 5 nights is a 20% discount off the standard rate of $339.40.
The standard (non-discounted) rate increased for the longer stay. As others have said, likely because of the additional weekend night. Thus while your discounted average nightly rates are very similar, it's a larger savings for the 5 night. It seems you didn't do the math but simply looked at the final average per night.