Why do some companies take so long to hire?
If a company is really desperate for help, then chances are they are already shorthanded and overly busy. It can be very difficult to stop addressing the day-to-day fires and take time to hire someone.
In other cases, it can take a while to work through the hiring hurdles. They have to set interview dates when everyone pertinent is available. Then they need to set a date for a meeting to decide whom to hire. Followed by conducting background checks. Then HR needs to put together appropriate documentation. And then decide on salary and contracts. Etcetera.
While in other cases, hiring someone feels overwhelming, and they need to feel absolutely certain before they make a decision. So they spend a lot of time deliberating and discussing potential candidates with their team.
Unfortunately, you may not hear back for a week or two or even three after the interview. If the interviewer informed you that it may take three weeks to get back to you, you'll just have to wait.
In the meantime, it's always advisable that you continue your search. Never put everything on hold as you wait for a response. Better to have multiple offers, than to wait on just one reply for weeks and lose valuable job searching time while in limbo.