What is the textbook 发展汉语：高级口语（I) referring to about the etymology of 买单?
In short, 買單 comes from 埋單 because Cantonese 埋 (tone 4, 陽平, contour 21 or 11) sounds very similar to Mandarin 買 (tone 3, 上聲, contour 214) where the ending rise isn't sounded when followed by 單.
Here Cantonese 埋 means to &quot;settle&quot;, &quot;finish off&quot;, or &quot;draw near&quot;. E.g. 埋數 (finish off the numbers / do accounting), 埋位 (settle in to a seat), 埋口 (heal up an open wound).
The below are from references in Wikipedia 埋單, mentioned by @水巷孑蠻. Translations mine.
Lau Tin Chi (劉天賜)
Wen Wei Po 2003-02-08, &quot;俗語趣談：埋單&quot; (archived version)

解釋：結賬、算賬，也有俗解成死亡、完結。現在內地、台灣等地方漸受香港語言影響，亦以「埋單」表示結賬。但用錯了字，以為是「買單」，殊不知「埋」字是廣府話的神髓。


Explanation: to pay a bill, to settle a bill [or score]; also popularly interpreted as [causing] death, finishing off. Nowadays in Mainland, Taiwan, etc., being gradually influenced by Hong Kong language [usage], &quot;埋單&quot; is also used to express paying of a bill. But the wrong word is used, it is thought to be &quot;買單&quot;, and hardly known that &quot;埋&quot; is quintessence of Cantonese.

Dr Lam Kin Ping (林建平博士)
Archived version of CUHK 普通話速遞 No. 48, &quot;衣食住行AA制&quot;

「買單」源自「埋單」
上文提到「買單」，原為粵方言詞，寫作「埋單」。「埋」是收攏、靠攏的意思，埋單就是把消費的帳單收攏在一起最後結帳。粵語的「埋單」和普通話的「買單」讀音相合：「埋」（mai），粵語是個低平調（陽平），一般認為調值是21；「買」（mai），普通話單唸是個降升調，但在「買單」一詞中，則讀作半三聲，調值211，與粵語的低平調非常脗合。因此，「埋單」進入普通話後，多寫作「買單」。可以說，普通話的「買單」，借用了粵語的音，然後另起爐灶，造了「買單」這個新詞。


&quot;買單&quot; sourced from &quot;埋單&quot;
&quot;買單&quot; mentioned in the text above is originally a Cantonese phrase, written &quot;埋單&quot;. &quot;埋&quot; has the meaning of gathering, drawing close; 埋單 is to gather in the bills of expenses together for a final paying of the bill. Cantonese &quot;埋單&quot; and Mandarin &quot;買單&quot; have matching pronunciations: &quot;埋&quot; (mai) in Cantonese has lower level tone (light level) [i.e. tone 4], commonly held to have tone value 21; &quot;買&quot; (mai) read alone in Mandarin has falling-rising tone, but in the phrase &quot;買單&quot;, is read in half-third-tone, tone value 211, quite a match with Cantonese lower level tone. Thus, &quot;埋單&quot; after entering Mandarin [usage], is mostly written &quot;買單&quot;. One may say, Mandarin's &quot;買單&quot; has borrowed the pronunciation in Cantonese, then set up its own shop, creating the new phrase &quot;買單&quot;.