Why is UK National Insurance calculated weekly?
The smallest period of work paid by companies to their employees is typically a week due to the overheads and costs associated with running a payroll for their staff (printing payslips, calculating and reporting various taxes, benefits and allowances incl. NI and SSP to various government departments incl. HMRC). Article by Payroll Bureau Founder (see section 'Does it cost more to pay more frequently?'
Why is it arranged like this?
The UK tax system (incorrectly) assumes a consistent weekly income (i.e. you will be paid the same last week as this week) which results in the weekly NI income threshold of £155 (and other painful tax calculation systems like the Self-Assessment Payment-on-Account system if you have variable annual pay).
I would have thought those people should pay the same amount of tax.
Scenarios like you have described is why at the end of the tax year, a P60 and P11D is submitted to HMRC by your employer and a rebate can occur if you have paid too much tax as would happen in the case of the person who paid higher tax in one week vs the person paying the correct level of tax each week. In the end, they do end up paying the same amount of tax.