The advantages to streetcars aren't limited to what I suggest. They also include noise and air quality advantages (hooking up to municipal power sources instead of carrying their own engines), human advantages (they tend to be more comfortable than buses, both because of road quality and size), capacity, and so forth.
There are many, many situations where buses (ideally, electrified ones) are the right choice. But there are also many situations where streetcars are the right choice, which is why many cities run both (or one over the other).
Right, at which point it's a cramped, bumpier trolley. It no longer has the main advantage that buses offer, which is being able to alternate their routes based on traffic or blockages.
You can make bigger buses, but they still need to conform to a different set of safety and size standards. Trolleys can make better use of standard lane space (and frequently fit better into standard lanes in older cities, since they can articulate for turns much better).
Laying track does not have to be expensive. Small-to-mid-sized cities in Europe do it cheaply and sustainably; many of the US's cities have streets that are already graded for streetcars and could be replanted without full surveys. I won't claim that it's uniformly cheaper than running a bus network, but that's not the sole factor in our civic construction process -- we also consider quality of life, performance, and appeal.
Nontrivial after adding the second deck (common in UK & Hong Kong), or an articulation (common in EU and mainland China)
However for tram, the upper limit is your platform length. It's also common to run single trains off-peak, couple two together during busy hours to double the capacity.
There are many, many situations where buses (ideally, electrified ones) are the right choice. But there are also many situations where streetcars are the right choice, which is why many cities run both (or one over the other).