Imagine a limit order to Sell at $9.99 comes before a limit order to buy at a higher(!) price of $10.01. You may feel 2nd trader is crazy, but it can happen in a fast market. It can also happen for price-control on a market order — See 
Q: execute at what price?
%%A: at the earlier quote’s price. $9.99 in this case.
A limit Buy must be executed at the specified-price-or-better, by the definition of limit orders
Exchange ought to publish a transaction price at the earlier quote’s price. I feel this is so as to maintain a realistic view of the supply/demand on the security.
The rule — 2nd limit order is a “marketable limit order” and treated as a market order. What’s wrong if exchange decides to set the execution price at the late-comer’s price?
– Suppose this is the last trade of the day. The closing price would be skewed/influenced by the “crazy” trader. This would create a skewed view of the price level of the stock.
– Or suppose a trader wants to trigger false signals, so she sends a few “stupid” limit orders once a while to make exchange send out artificially high last-execution prices. There are many algorithmic trading engines out there that react to last-execution prices, so execution price feed ought to be designed as a realistic reflection of supply/demand.
– A “crazy” trader can easily create a historical high in the price feed by buying one share at $800. Clearly unrealistic and misleading price information.
But why do I say the earlier quote’s price is more realistic and consistent with reality on the market?
* the 2nd limit order is irrational, or simply a mistake.
* the earlier quote has remained in the market longer and therefore represents a more serious, more firm and more rational intention
If the 2nd limit order is a serious order, it has to be a larger order (otherwise I can’t see why you call it serious). In that case the unfilled portion will remain in the market, and represents a serious intention.
Dr. Hongsong Chou actually said a BUY market order can be seen as a (marketable) limit order with price = +inf.
 given The Rule, a rational justification to use a marketable limit order is to put a constrain on an otherwise unconstrained market order in a fast market. An unconstrained market order could result in a disastrous Buy at $18.